public class ClusteredPositionDeleteWriter<T>
extends java.lang.Object
Constructor and Description |
---|
ClusteredPositionDeleteWriter(FileWriterFactory<T> writerFactory,
OutputFileFactory fileFactory,
FileIO io,
long targetFileSizeInBytes) |
ClusteredPositionDeleteWriter(FileWriterFactory<T> writerFactory,
OutputFileFactory fileFactory,
FileIO io,
long targetFileSizeInBytes,
DeleteGranularity granularity) |
Modifier and Type | Method and Description |
---|---|
protected void |
addResult(DeleteWriteResult result) |
protected DeleteWriteResult |
aggregatedResult() |
void |
close() |
protected FileWriter<PositionDelete<T>,DeleteWriteResult> |
newWriter(PartitionSpec spec,
StructLike partition) |
R |
result()
Returns a result that contains information about written
DataFile s or DeleteFile s. |
void |
write(T row,
PartitionSpec spec,
StructLike partition)
Writes a row to the provided spec/partition.
|
public ClusteredPositionDeleteWriter(FileWriterFactory<T> writerFactory, OutputFileFactory fileFactory, FileIO io, long targetFileSizeInBytes)
public ClusteredPositionDeleteWriter(FileWriterFactory<T> writerFactory, OutputFileFactory fileFactory, FileIO io, long targetFileSizeInBytes, DeleteGranularity granularity)
protected FileWriter<PositionDelete<T>,DeleteWriteResult> newWriter(PartitionSpec spec, StructLike partition)
protected void addResult(DeleteWriteResult result)
protected DeleteWriteResult aggregatedResult()
public void write(T row, PartitionSpec spec, StructLike partition)
PartitioningWriter
write
in interface PartitioningWriter<T,R>
row
- a data or delete recordspec
- a partition specpartition
- a partition or null if the spec is unpartitionedpublic 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()
PartitioningWriter
DataFile
s or DeleteFile
s. The result is valid only after the writer is closed.result
in interface PartitioningWriter<T,R>