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
Modifier and TypeClassDescriptionprotected class
Base equality delta writer to write both insert records and equality-deletes.protected class
protected class
-
Constructor Summary
ModifierConstructorDescriptionprotected
BaseTaskWriter
(PartitionSpec spec, FileFormat format, FileAppenderFactory<T> appenderFactory, OutputFileFactory fileFactory, FileIO io, long targetFileSize) -
Method Summary
Modifier and TypeMethodDescriptionvoid
abort()
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 void
setFailure
(Throwable throwable) protected PartitionSpec
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, 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:TaskWriter
Close the writer and delete the completed files if possible when aborting.- Specified by:
abort
in interfaceTaskWriter<T>
- Throws:
IOException
- if any IO error happen.
-
complete
Description copied from interface:TaskWriter
Close the writer and get the completed data and delete files.- Specified by:
complete
in interfaceTaskWriter<T>
- Returns:
- the completed data and delete files of this task writer.
- Throws:
IOException
-