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) protectedBaseTaskWriter(PartitionSpec spec, FileFormat format, FileWriterFactory<T> writerFactory, OutputFileFactory fileFactory, FileIO io, long targetFileSize) protectedBaseTaskWriter(PartitionSpec spec, FileFormat format, FileWriterFactory<T> writerFactory, OutputFileFactory fileFactory, FileIO io, long targetFileSize, boolean useDv) -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()Close the writer and delete the completed files if possible when aborting.voidclose()complete()Close the writer and get the completed data and delete files.protected PartitioningDVWriter<T> 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) -
BaseTaskWriter
protected BaseTaskWriter(PartitionSpec spec, FileFormat format, FileWriterFactory<T> writerFactory, OutputFileFactory fileFactory, FileIO io, long targetFileSize) -
BaseTaskWriter
protected BaseTaskWriter(PartitionSpec spec, FileFormat format, FileWriterFactory<T> writerFactory, OutputFileFactory fileFactory, FileIO io, long targetFileSize, boolean useDv)
-
-
Method Details
-
spec
-
setFailure
-
dvFileWriter
-
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
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-