Package org.apache.iceberg.deletes
Class EqualityDeleteWriter<T>
- java.lang.Object
-
- org.apache.iceberg.deletes.EqualityDeleteWriter<T>
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,FileWriter<T,DeleteWriteResult>
public class EqualityDeleteWriter<T> extends java.lang.Object implements FileWriter<T,DeleteWriteResult>
-
-
Constructor Summary
Constructors Constructor Description EqualityDeleteWriter(FileAppender<T> appender, FileFormat format, java.lang.String location, PartitionSpec spec, StructLike partition, EncryptionKeyMetadata keyMetadata, SortOrder sortOrder, int... equalityFieldIds)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
close()
void
delete(T row)
Deprecated.since 0.13.0, will be removed in 0.14.0; usewrite(Object)
instead.void
deleteAll(java.lang.Iterable<T> rows)
Deprecated.since 0.13.0, will be removed in 0.14.0; useFileWriter.write(Iterable)
instead.long
length()
Returns the number of bytes that were currently written by this writer.DeleteWriteResult
result()
Returns a result that contains information about writtenDataFile
s orDeleteFile
s.DeleteFile
toDeleteFile()
void
write(T row)
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
-
EqualityDeleteWriter
public EqualityDeleteWriter(FileAppender<T> appender, FileFormat format, java.lang.String location, PartitionSpec spec, StructLike partition, EncryptionKeyMetadata keyMetadata, SortOrder sortOrder, int... equalityFieldIds)
-
-
Method Detail
-
write
public void write(T row)
Description copied from interface:FileWriter
Writes a row to a predefined spec/partition.- Specified by:
write
in interfaceFileWriter<T,DeleteWriteResult>
- Parameters:
row
- a data or delete record
-
deleteAll
@Deprecated public void deleteAll(java.lang.Iterable<T> rows)
Deprecated.since 0.13.0, will be removed in 0.14.0; useFileWriter.write(Iterable)
instead.Writes equality deletes.
-
delete
@Deprecated public void delete(T row)
Deprecated.since 0.13.0, will be removed in 0.14.0; usewrite(Object)
instead.Writes an equality delete.
-
length
public long length()
Description copied from interface:FileWriter
Returns the number of bytes that were currently written by this writer.- Specified by:
length
in interfaceFileWriter<T,DeleteWriteResult>
- Returns:
- the number of written bytes
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
toDeleteFile
public DeleteFile toDeleteFile()
-
result
public DeleteWriteResult result()
Description copied from interface:FileWriter
Returns a result that contains information about writtenDataFile
s orDeleteFile
s. The result is valid only after the writer is closed.- Specified by:
result
in interfaceFileWriter<T,DeleteWriteResult>
- Returns:
- the file writer result
-
-