Package org.apache.iceberg.io
Class BasePositionDeltaWriter<T>
java.lang.Object
org.apache.iceberg.io.BasePositionDeltaWriter<T>
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- PositionDeltaWriter<T>
- 
Constructor SummaryConstructorsConstructorDescriptionBasePositionDeltaWriter(PartitioningWriter<T, DataWriteResult> dataWriter, PartitioningWriter<PositionDelete<T>, DeleteWriteResult> deleteWriter) BasePositionDeltaWriter(PartitioningWriter<T, DataWriteResult> insertWriter, PartitioningWriter<T, DataWriteResult> updateWriter, PartitioningWriter<PositionDelete<T>, DeleteWriteResult> deleteWriter) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()voiddelete(CharSequence path, long pos, T row, PartitionSpec spec, StructLike partition) Deletes a position in the provided spec/partition and records the deleted row in the delete file.voidinsert(T row, PartitionSpec spec, StructLike partition) Inserts a row to the provided spec/partition.result()Returns a result that contains information about writtenDataFiles orDeleteFiles.voidupdate(T row, PartitionSpec spec, StructLike partition) Inserts a new version of an existing row to the provided spec/partition.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.iceberg.io.PositionDeltaWriterdelete
- 
Constructor Details- 
BasePositionDeltaWriterpublic BasePositionDeltaWriter(PartitioningWriter<T, DataWriteResult> dataWriter, PartitioningWriter<PositionDelete<T>, DeleteWriteResult> deleteWriter) 
- 
BasePositionDeltaWriterpublic BasePositionDeltaWriter(PartitioningWriter<T, DataWriteResult> insertWriter, PartitioningWriter<T, DataWriteResult> updateWriter, PartitioningWriter<PositionDelete<T>, DeleteWriteResult> deleteWriter) 
 
- 
- 
Method Details- 
insertDescription copied from interface:PositionDeltaWriterInserts a row to the provided spec/partition.- Specified by:
- insertin interface- PositionDeltaWriter<T>
- Parameters:
- row- a data record
- spec- a partition spec
- partition- a partition or null if the spec is unpartitioned
 
- 
updateDescription copied from interface:PositionDeltaWriterInserts a new version of an existing row to the provided spec/partition.This method allows writers to distinguish new and updated records. The caller must separately invoke PositionDeltaWriter.delete(CharSequence, long, PartitionSpec, StructLike)for the original row position that is being updated.- Specified by:
- updatein interface- PositionDeltaWriter<T>
- Parameters:
- row- a new version of an existing row
- spec- a new partition spec
- partition- a new partition or null if the spec is unpartitioned
 
- 
deleteDescription copied from interface:PositionDeltaWriterDeletes a position in the provided spec/partition and records the deleted row in the delete file.- Specified by:
- deletein interface- PositionDeltaWriter<T>
- Parameters:
- path- a data file path
- pos- a position
- row- a deleted row
- spec- a partition spec
- partition- a partition or null if the spec is unpartitioned
 
- 
resultDescription copied from interface:PositionDeltaWriterReturns a result that contains information about writtenDataFiles orDeleteFiles. The result is valid only after the writer is closed.- Specified by:
- resultin interface- PositionDeltaWriter<T>
- Returns:
- the writer result
 
- 
close- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Throws:
- IOException
 
 
-