Package org.apache.iceberg.deletes
Class BaseDVFileWriter
java.lang.Object
org.apache.iceberg.deletes.BaseDVFileWriter
- All Implemented Interfaces:
Closeable,AutoCloseable,DVFileWriter
-
Constructor Summary
ConstructorsConstructorDescriptionBaseDVFileWriter(Supplier<OutputFile> dvOutputFile, Function<String, PositionDeleteIndex> loadPreviousDeletes) BaseDVFileWriter(OutputFileFactory fileFactory, Function<String, PositionDeleteIndex> loadPreviousDeletes) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voiddelete(String path, long pos, PartitionSpec spec, StructLike partition) Marks a position in a given data file as deleted.voiddelete(String path, PositionDeleteIndex positionDeleteIndex, PartitionSpec spec, StructLike partition) Marks every position that is deleted in positionDeleteIndex as deleted in the given data file.result()Returns a result that contains information about writtenDeleteFiles.
-
Constructor Details
-
BaseDVFileWriter
public BaseDVFileWriter(OutputFileFactory fileFactory, Function<String, PositionDeleteIndex> loadPreviousDeletes) -
BaseDVFileWriter
public BaseDVFileWriter(Supplier<OutputFile> dvOutputFile, Function<String, PositionDeleteIndex> loadPreviousDeletes)
-
-
Method Details
-
delete
Description copied from interface:DVFileWriterMarks a position in a given data file as deleted.- Specified by:
deletein interfaceDVFileWriter- Parameters:
path- the data file pathpos- the data file positionspec- the data file partition specpartition- the data file partition
-
delete
public void delete(String path, PositionDeleteIndex positionDeleteIndex, PartitionSpec spec, StructLike partition) Description copied from interface:DVFileWriterMarks every position that is deleted in positionDeleteIndex as deleted in the given data file. Implementations should merge with existing position indices for the provided path- Specified by:
deletein interfaceDVFileWriter- Parameters:
path- the data file pathpositionDeleteIndex- the position delete index containing all the positions to deletespec- the data file partition specpartition- the data file partition
-
result
Description copied from interface:DVFileWriterReturns a result that contains information about writtenDeleteFiles. The result is valid only after the writer is closed.- Specified by:
resultin interfaceDVFileWriter- Returns:
- the writer result
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-