Package org.apache.iceberg.io
Class OutputFileFactory
- java.lang.Object
-
- org.apache.iceberg.io.OutputFileFactory
-
public class OutputFileFactory extends java.lang.Object
Factory responsible for generating unique but recognizable data file names.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OutputFileFactory.Builder
-
Constructor Summary
Constructors Constructor Description OutputFileFactory(PartitionSpec spec, FileFormat format, LocationProvider locations, FileIO io, EncryptionManager encryptionManager, int partitionId, long taskId)
Deprecated.since 0.12.0, will be removed in 0.13.0; usebuilderFor(Table, int, long)
instead.OutputFileFactory(PartitionSpec spec, FileFormat format, LocationProvider locations, FileIO io, EncryptionManager encryptionManager, int partitionId, long taskId, java.lang.String operationId)
Deprecated.since 0.12.0, will be removed in 0.13.0; usebuilderFor(Table, int, long)
instead.OutputFileFactory(Table table, FileFormat format, int partitionId, long taskId)
Deprecated.OutputFileFactory(Table table, PartitionSpec spec, FileFormat format, int partitionId, long taskId)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OutputFileFactory.Builder
builderFor(Table table, int partitionId, long taskId)
EncryptedOutputFile
newOutputFile()
Generates anEncryptedOutputFile
for unpartitioned writes.EncryptedOutputFile
newOutputFile(PartitionSpec spec, StructLike partition)
Generates anEncryptedOutputFile
for partitioned writes in a given spec.EncryptedOutputFile
newOutputFile(StructLike partition)
Generates anEncryptedOutputFile
for partitioned writes in the default spec.
-
-
-
Constructor Detail
-
OutputFileFactory
@Deprecated public OutputFileFactory(Table table, FileFormat format, int partitionId, long taskId)
Deprecated.
-
OutputFileFactory
@Deprecated public OutputFileFactory(Table table, PartitionSpec spec, FileFormat format, int partitionId, long taskId)
Deprecated.
-
OutputFileFactory
@Deprecated public OutputFileFactory(PartitionSpec spec, FileFormat format, LocationProvider locations, FileIO io, EncryptionManager encryptionManager, int partitionId, long taskId)
Deprecated.since 0.12.0, will be removed in 0.13.0; usebuilderFor(Table, int, long)
instead.Constructor where a generated UUID is used as the operationId to ensure uniqueness.- Parameters:
spec
- Partition specification used by the location providerformat
- File format used for the extensionlocations
- Location provider used for generating locationsio
- FileIO to store the filesencryptionManager
- Encryption manager used for encrypting the filespartitionId
- First part of the file nametaskId
- Second part of the file name
-
OutputFileFactory
@Deprecated public OutputFileFactory(PartitionSpec spec, FileFormat format, LocationProvider locations, FileIO io, EncryptionManager encryptionManager, int partitionId, long taskId, java.lang.String operationId)
Deprecated.since 0.12.0, will be removed in 0.13.0; usebuilderFor(Table, int, long)
instead.Constructor with specific operationId. The [partitionId, taskId, operationId] triplet has to be unique across JVM instances otherwise the same file name could be generated by different instances of the OutputFileFactory.- Parameters:
spec
- Partition specification used by the location providerformat
- File format used for the extensionlocations
- Location provider used for generating locationsio
- FileIO to store the filesencryptionManager
- Encryption manager used for encrypting the filespartitionId
- First part of the file nametaskId
- Second part of the file nameoperationId
- Third part of the file name
-
-
Method Detail
-
builderFor
public static OutputFileFactory.Builder builderFor(Table table, int partitionId, long taskId)
-
newOutputFile
public EncryptedOutputFile newOutputFile()
Generates anEncryptedOutputFile
for unpartitioned writes.
-
newOutputFile
public EncryptedOutputFile newOutputFile(StructLike partition)
Generates anEncryptedOutputFile
for partitioned writes in the default spec.
-
newOutputFile
public EncryptedOutputFile newOutputFile(PartitionSpec spec, StructLike partition)
Generates anEncryptedOutputFile
for partitioned writes in a given spec.
-
-