Package org.apache.iceberg.deletes
Class PositionDeleteWriter<T>
- java.lang.Object
-
- org.apache.iceberg.deletes.PositionDeleteWriter<T>
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,FileWriter<PositionDelete<T>,DeleteWriteResult>
public class PositionDeleteWriter<T> extends java.lang.Object implements FileWriter<PositionDelete<T>,DeleteWriteResult>
-
-
Constructor Summary
Constructors Constructor Description PositionDeleteWriter(FileAppender<StructLike> appender, FileFormat format, java.lang.String location, PartitionSpec spec, StructLike partition, EncryptionKeyMetadata keyMetadata)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclose()voiddelete(java.lang.CharSequence path, long pos)Deprecated.since 0.13.0, will be removed in 0.14.0; usewrite(PositionDelete)instead.voiddelete(java.lang.CharSequence path, long pos, T row)Deprecated.since 0.13.0, will be removed in 0.14.0; usewrite(PositionDelete)instead.longlength()Returns the number of bytes that were currently written by this writer.CharSequenceSetreferencedDataFiles()DeleteWriteResultresult()Returns a result that contains information about writtenDataFiles orDeleteFiles.DeleteFiletoDeleteFile()voidwrite(PositionDelete<T> positionDelete)Writes a row to a predefined spec/partition.-
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.FileWriter
write
-
-
-
-
Constructor Detail
-
PositionDeleteWriter
public PositionDeleteWriter(FileAppender<StructLike> appender, FileFormat format, java.lang.String location, PartitionSpec spec, StructLike partition, EncryptionKeyMetadata keyMetadata)
-
-
Method Detail
-
write
public void write(PositionDelete<T> positionDelete)
Description copied from interface:FileWriterWrites a row to a predefined spec/partition.- Specified by:
writein interfaceFileWriter<PositionDelete<T>,DeleteWriteResult>- Parameters:
positionDelete- a data or delete record
-
delete
@Deprecated public void delete(java.lang.CharSequence path, long pos)Deprecated.since 0.13.0, will be removed in 0.14.0; usewrite(PositionDelete)instead.Writes a position delete.
-
delete
@Deprecated public void delete(java.lang.CharSequence path, long pos, T row)Deprecated.since 0.13.0, will be removed in 0.14.0; usewrite(PositionDelete)instead.Writes a position delete and persists the deleted row.
-
length
public long length()
Description copied from interface:FileWriterReturns the number of bytes that were currently written by this writer.- Specified by:
lengthin interfaceFileWriter<PositionDelete<T>,DeleteWriteResult>- Returns:
- the number of written bytes
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
referencedDataFiles
public CharSequenceSet referencedDataFiles()
-
toDeleteFile
public DeleteFile toDeleteFile()
-
result
public DeleteWriteResult result()
Description copied from interface:FileWriterReturns a result that contains information about writtenDataFiles orDeleteFiles. The result is valid only after the writer is closed.- Specified by:
resultin interfaceFileWriter<PositionDelete<T>,DeleteWriteResult>- Returns:
- the file writer result
-
-