public class RollingPositionDeleteWriter<T>
extends java.lang.Object
| Constructor and Description |
|---|
RollingPositionDeleteWriter(FileWriterFactory<T> writerFactory,
OutputFileFactory fileFactory,
FileIO io,
long targetFileSizeInBytes,
PartitionSpec spec,
StructLike partition) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addResult(DeleteWriteResult result) |
protected DeleteWriteResult |
aggregatedResult() |
void |
close() |
java.lang.CharSequence |
currentFilePath() |
long |
currentFileRows() |
long |
length()
Returns the number of bytes that were currently written by this writer.
|
protected PositionDeleteWriter<T> |
newWriter(EncryptedOutputFile file) |
protected void |
openCurrentWriter() |
protected StructLike |
partition() |
R |
result()
Returns a result that contains information about written
DataFiles or DeleteFiles. |
protected PartitionSpec |
spec() |
void |
write(T row)
Writes a row to a predefined spec/partition.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwritepublic RollingPositionDeleteWriter(FileWriterFactory<T> writerFactory, OutputFileFactory fileFactory, FileIO io, long targetFileSizeInBytes, PartitionSpec spec, StructLike partition)
protected PositionDeleteWriter<T> newWriter(EncryptedOutputFile file)
protected void addResult(DeleteWriteResult result)
protected DeleteWriteResult aggregatedResult()
protected PartitionSpec spec()
protected StructLike partition()
public java.lang.CharSequence currentFilePath()
public long currentFileRows()
public long length()
FileWriterlength in interface FileWriter<T,R>public void write(T row)
FileWriterwrite in interface FileWriter<T,R>row - a data or delete recordprotected void openCurrentWriter()
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionpublic final R result()
FileWriterDataFiles or DeleteFiles. The result is valid only after the writer is closed.result in interface FileWriter<T,R>