public class FileScopedPositionDeleteWriter<T> extends java.lang.Object implements FileWriter<PositionDelete<T>,DeleteWriteResult>
This writer does not keep track of seen deletes and assumes all incoming records are ordered
by file and position as required by the spec. If there is no external process to order the
records, consider using SortingPositionOnlyDeleteWriter instead.
| Constructor and Description |
|---|
FileScopedPositionDeleteWriter(java.util.function.Supplier<FileWriter<PositionDelete<T>,DeleteWriteResult>> writers) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
length()
Returns the number of bytes that were currently written by this writer.
|
DeleteWriteResult |
result()
Returns a result that contains information about written
DataFiles or DeleteFiles. |
void |
write(PositionDelete<T> positionDelete)
Writes a row to a predefined spec/partition.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwritepublic FileScopedPositionDeleteWriter(java.util.function.Supplier<FileWriter<PositionDelete<T>,DeleteWriteResult>> writers)
public void write(PositionDelete<T> positionDelete)
FileWriterwrite in interface FileWriter<PositionDelete<T>,DeleteWriteResult>positionDelete - a data or delete recordpublic long length()
FileWriterlength in interface FileWriter<PositionDelete<T>,DeleteWriteResult>public DeleteWriteResult result()
FileWriterDataFiles or DeleteFiles. The result is valid only after the writer is closed.result in interface FileWriter<PositionDelete<T>,DeleteWriteResult>public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException