public class BasePositionDeltaWriter<T> extends java.lang.Object implements PositionDeltaWriter<T>
| Constructor and Description |
|---|
BasePositionDeltaWriter(PartitioningWriter<T,DataWriteResult> dataWriter,
PartitioningWriter<PositionDelete<T>,DeleteWriteResult> deleteWriter) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
delete(java.lang.CharSequence path,
long pos,
T row,
PartitionSpec spec,
StructLike partition)
Deletes a position in the provided spec/partition and records the deleted row in the delete file.
|
void |
insert(T row,
PartitionSpec spec,
StructLike partition)
Inserts a row to the provided spec/partition.
|
WriteResult |
result()
Returns a result that contains information about written
DataFiles or DeleteFiles. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdeletepublic BasePositionDeltaWriter(PartitioningWriter<T,DataWriteResult> dataWriter, PartitioningWriter<PositionDelete<T>,DeleteWriteResult> deleteWriter)
public void insert(T row, PartitionSpec spec, StructLike partition)
PositionDeltaWriterinsert in interface PositionDeltaWriter<T>row - a data recordspec - a partition specpartition - a partition or null if the spec is unpartitionedpublic void delete(java.lang.CharSequence path,
long pos,
T row,
PartitionSpec spec,
StructLike partition)
PositionDeltaWriterdelete in interface PositionDeltaWriter<T>path - a data file pathpos - a positionrow - a deleted rowspec - a partition specpartition - a partition or null if the spec is unpartitionedpublic WriteResult result()
PositionDeltaWriterDataFiles or DeleteFiles.
The result is valid only after the writer is closed.result in interface PositionDeltaWriter<T>public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException