Package org.apache.iceberg.data
Class GenericAppenderFactory
- java.lang.Object
-
- org.apache.iceberg.data.GenericAppenderFactory
-
- All Implemented Interfaces:
FileAppenderFactory<Record>
public class GenericAppenderFactory extends java.lang.Object implements FileAppenderFactory<Record>
Factory to create a newFileAppender
to writeRecord
s.
-
-
Constructor Summary
Constructors Constructor Description GenericAppenderFactory(Schema schema)
GenericAppenderFactory(Schema schema, PartitionSpec spec)
GenericAppenderFactory(Schema schema, PartitionSpec spec, int[] equalityFieldIds, Schema eqDeleteRowSchema, Schema posDeleteRowSchema)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileAppender<Record>
newAppender(OutputFile outputFile, FileFormat fileFormat)
Create a newFileAppender
.DataWriter<Record>
newDataWriter(EncryptedOutputFile file, FileFormat format, StructLike partition)
Create a newDataWriter
.EqualityDeleteWriter<Record>
newEqDeleteWriter(EncryptedOutputFile file, FileFormat format, StructLike partition)
Create a newEqualityDeleteWriter
.PositionDeleteWriter<Record>
newPosDeleteWriter(EncryptedOutputFile file, FileFormat format, StructLike partition)
Create a newPositionDeleteWriter
.GenericAppenderFactory
set(java.lang.String property, java.lang.String value)
GenericAppenderFactory
setAll(java.util.Map<java.lang.String,java.lang.String> properties)
-
-
-
Constructor Detail
-
GenericAppenderFactory
public GenericAppenderFactory(Schema schema)
-
GenericAppenderFactory
public GenericAppenderFactory(Schema schema, PartitionSpec spec)
-
GenericAppenderFactory
public GenericAppenderFactory(Schema schema, PartitionSpec spec, int[] equalityFieldIds, Schema eqDeleteRowSchema, Schema posDeleteRowSchema)
-
-
Method Detail
-
set
public GenericAppenderFactory set(java.lang.String property, java.lang.String value)
-
setAll
public GenericAppenderFactory setAll(java.util.Map<java.lang.String,java.lang.String> properties)
-
newAppender
public FileAppender<Record> newAppender(OutputFile outputFile, FileFormat fileFormat)
Description copied from interface:FileAppenderFactory
Create a newFileAppender
.- Specified by:
newAppender
in interfaceFileAppenderFactory<Record>
- Parameters:
outputFile
- an OutputFile used to create an output stream.fileFormat
- File format.- Returns:
- a newly created
FileAppender
-
newDataWriter
public DataWriter<Record> newDataWriter(EncryptedOutputFile file, FileFormat format, StructLike partition)
Description copied from interface:FileAppenderFactory
Create a newDataWriter
.- Specified by:
newDataWriter
in interfaceFileAppenderFactory<Record>
- Parameters:
file
- an OutputFile used to create an output stream.format
- a file formatpartition
- a tuple of partition values- Returns:
- a newly created
DataWriter
for rows
-
newEqDeleteWriter
public EqualityDeleteWriter<Record> newEqDeleteWriter(EncryptedOutputFile file, FileFormat format, StructLike partition)
Description copied from interface:FileAppenderFactory
Create a newEqualityDeleteWriter
.- Specified by:
newEqDeleteWriter
in interfaceFileAppenderFactory<Record>
- Parameters:
file
- an OutputFile used to create an output stream.format
- a file formatpartition
- a tuple of partition values- Returns:
- a newly created
EqualityDeleteWriter
for equality deletes
-
newPosDeleteWriter
public PositionDeleteWriter<Record> newPosDeleteWriter(EncryptedOutputFile file, FileFormat format, StructLike partition)
Description copied from interface:FileAppenderFactory
Create a newPositionDeleteWriter
.- Specified by:
newPosDeleteWriter
in interfaceFileAppenderFactory<Record>
- Parameters:
file
- an OutputFile used to create an output stream.format
- a file formatpartition
- a tuple of partition values- Returns:
- a newly created
PositionDeleteWriter
for position deletes
-
-