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
DataFile s or DeleteFile s. |
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, wait
write
public 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()
FileWriter
length
in interface FileWriter<T,R>
public void write(T row)
FileWriter
write
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.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
public final R result()
FileWriter
DataFile
s or DeleteFile
s. The result is valid only after the writer is closed.result
in interface FileWriter<T,R>