Package org.apache.iceberg.io
Class RollingEqualityDeleteWriter<T>
java.lang.Object
org.apache.iceberg.io.RollingEqualityDeleteWriter<T>
- All Implemented Interfaces:
Closeable
,AutoCloseable
,FileWriter<T,
DeleteWriteResult>
A rolling equality delete writer that splits incoming deletes into multiple files within one
spec/partition based on the target file size.
-
Constructor Summary
ConstructorDescriptionRollingEqualityDeleteWriter
(FileWriterFactory<T> writerFactory, OutputFileFactory fileFactory, FileIO io, long targetFileSizeInBytes, PartitionSpec spec, StructLike partition) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addResult
(DeleteWriteResult result) protected DeleteWriteResult
void
close()
long
long
length()
Returns the number of bytes that were currently written by this writer.protected EqualityDeleteWriter<T>
newWriter
(EncryptedOutputFile file) protected void
protected StructLike
final DeleteWriteResult
result()
Returns a result that contains information about writtenDataFile
s orDeleteFile
s.protected PartitionSpec
spec()
void
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 Details
-
RollingEqualityDeleteWriter
public RollingEqualityDeleteWriter(FileWriterFactory<T> writerFactory, OutputFileFactory fileFactory, FileIO io, long targetFileSizeInBytes, PartitionSpec spec, StructLike partition)
-
-
Method Details
-
newWriter
-
addResult
-
aggregatedResult
-
spec
-
partition
-
currentFilePath
-
currentFileRows
public long currentFileRows() -
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,
W extends FileWriter<T, R>> - Returns:
- the number of written bytes
-
write
Description copied from interface:FileWriter
Writes a row to a predefined spec/partition.- Specified by:
write
in interfaceFileWriter<T,
W extends FileWriter<T, R>> - Parameters:
row
- a data or delete record
-
openCurrentWriter
protected void openCurrentWriter() -
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
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,
W extends FileWriter<T, R>> - Returns:
- the file writer result
-