Package org.apache.iceberg.io
Class BaseTaskWriter<T>
java.lang.Object
org.apache.iceberg.io.BaseTaskWriter<T>
- All Implemented Interfaces:
Closeable,AutoCloseable,TaskWriter<T>
- Direct Known Subclasses:
PartitionedFanoutWriter,PartitionedWriter,UnpartitionedWriter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classBase equality delta writer to write both insert records and equality-deletes.protected classprotected class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseTaskWriter(PartitionSpec spec, FileFormat format, FileAppenderFactory<T> appenderFactory, OutputFileFactory fileFactory, FileIO io, long targetFileSize) -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()Close the writer and delete the completed files if possible when aborting.complete()Close the writer and get the completed data and delete files.protected voidsetFailure(Throwable throwable) protected PartitionSpecspec()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.iceberg.io.TaskWriter
dataFiles, write
-
Constructor Details
-
BaseTaskWriter
protected BaseTaskWriter(PartitionSpec spec, FileFormat format, FileAppenderFactory<T> appenderFactory, OutputFileFactory fileFactory, FileIO io, long targetFileSize)
-
-
Method Details
-
spec
-
setFailure
-
abort
Description copied from interface:TaskWriterClose the writer and delete the completed files if possible when aborting.- Specified by:
abortin interfaceTaskWriter<T>- Throws:
IOException- if any IO error happen.
-
complete
Description copied from interface:TaskWriterClose the writer and get the completed data and delete files.- Specified by:
completein interfaceTaskWriter<T>- Returns:
- the completed data and delete files of this task writer.
- Throws:
IOException
-