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
DataFile s or DeleteFile s. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
delete
public BasePositionDeltaWriter(PartitioningWriter<T,DataWriteResult> dataWriter, PartitioningWriter<PositionDelete<T>,DeleteWriteResult> deleteWriter)
public void insert(T row, PartitionSpec spec, StructLike partition)
PositionDeltaWriter
insert
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)
PositionDeltaWriter
delete
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()
PositionDeltaWriter
DataFile
s or DeleteFile
s.
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.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException