Package org.apache.iceberg.io
Class PartitionedFanoutWriter<T>
- java.lang.Object
 - 
- org.apache.iceberg.io.BaseTaskWriter<T>
 - 
- org.apache.iceberg.io.PartitionedFanoutWriter<T>
 
 
 
- 
- All Implemented Interfaces:
 java.io.Closeable,java.lang.AutoCloseable,TaskWriter<T>
- Direct Known Subclasses:
 SparkPartitionedFanoutWriter
public abstract class PartitionedFanoutWriter<T> extends BaseTaskWriter<T>
 
- 
- 
Nested Class Summary
- 
Nested classes/interfaces inherited from class org.apache.iceberg.io.BaseTaskWriter
BaseTaskWriter.BaseEqualityDeltaWriter, BaseTaskWriter.RollingEqDeleteWriter, BaseTaskWriter.RollingFileWriter 
 - 
 
- 
Constructor Summary
Constructors Modifier Constructor Description protectedPartitionedFanoutWriter(PartitionSpec spec, FileFormat format, FileAppenderFactory<T> appenderFactory, OutputFileFactory fileFactory, FileIO io, long targetFileSize) 
- 
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclose()protected abstract PartitionKeypartition(T row)Create a PartitionKey from the values in row.voidwrite(T row)Write the row into the data files.- 
Methods inherited from class org.apache.iceberg.io.BaseTaskWriter
abort, complete, spec 
- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface org.apache.iceberg.io.TaskWriter
dataFiles 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
PartitionedFanoutWriter
protected PartitionedFanoutWriter(PartitionSpec spec, FileFormat format, FileAppenderFactory<T> appenderFactory, OutputFileFactory fileFactory, FileIO io, long targetFileSize)
 
 - 
 
- 
Method Detail
- 
partition
protected abstract PartitionKey partition(T row)
Create a PartitionKey from the values in row.Any PartitionKey returned by this method can be reused by the implementation.
- Parameters:
 row- a data row
 
- 
write
public void write(T row) throws java.io.IOException
Description copied from interface:TaskWriterWrite the row into the data files.- Throws:
 java.io.IOException
 
- 
close
public void close() throws java.io.IOException- Throws:
 java.io.IOException
 
 - 
 
 -