Package org.apache.iceberg.io
Interface TaskWriter<T>
- Type Parameters:
T- to indicate the record data type.
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
BaseTaskWriter,PartitionedFanoutWriter,PartitionedWriter,SparkPartitionedFanoutWriter,SparkPartitionedWriter,UnpartitionedWriter
The writer interface could accept records and provide the generated data files.
-
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.default DataFile[]Close the writer and get the completed data files, it requires that the task writer would produce data files only.voidWrite the row into the data files.
-
Method Details
-
write
Write the row into the data files.- Throws:
IOException
-
abort
Close the writer and delete the completed files if possible when aborting.- Throws:
IOException- if any IO error happen.
-
dataFiles
Close the writer and get the completed data files, it requires that the task writer would produce data files only.- Returns:
- the completed data files of this task writer.
- Throws:
IOException
-
complete
Close the writer and get the completed data and delete files.- Returns:
- the completed data and delete files of this task writer.
- Throws:
IOException
-