@Public public interface TableWrite extends AutoCloseable
Table to provide InternalRow writing.| Modifier and Type | Method and Description |
|---|---|
void |
compact(BinaryRow partition,
int bucket,
boolean fullCompaction)
Compact a bucket of a partition.
|
int |
getBucket(InternalRow row)
Calculate which bucket
row belongs to. |
BinaryRow |
getPartition(InternalRow row)
Calculate which partition
row belongs to. |
void |
withInsertOnly(boolean insertOnly)
This method is called when the insert only status of the records changes.
|
TableWrite |
withIOManager(IOManager ioManager)
With
IOManager, this is needed if 'write-buffer-spillable' is set to true. |
TableWrite |
withMemoryPool(MemorySegmentPool memoryPool)
With
MemorySegmentPool for the current table write. |
TableWrite |
withMetricRegistry(MetricRegistry registry)
With metrics to measure compaction.
|
void |
write(InternalRow row)
Write a row to the writer.
|
void |
write(InternalRow row,
int bucket)
Write a row with bucket.
|
void |
writeBundle(BinaryRow partition,
int bucket,
BundleRecords bundle)
Write a bundle records directly, not per row.
|
closeTableWrite withIOManager(IOManager ioManager)
IOManager, this is needed if 'write-buffer-spillable' is set to true.TableWrite withMemoryPool(MemorySegmentPool memoryPool)
MemorySegmentPool for the current table write.void withInsertOnly(boolean insertOnly)
insertOnly - If true, all the following records would be of RowKind.INSERT, and no two records would have the same primary
key.BinaryRow getPartition(InternalRow row)
row belongs to.int getBucket(InternalRow row)
row belongs to.void write(InternalRow row) throws Exception
Exceptionvoid write(InternalRow row, int bucket) throws Exception
Exceptionvoid writeBundle(BinaryRow partition, int bucket, BundleRecords bundle) throws Exception
Exceptionvoid compact(BinaryRow partition, int bucket, boolean fullCompaction) throws Exception
NOTE: In Java API, full compaction is not automatically executed. If you set 'changelog-producer' to 'full-compaction', please execute this method regularly to produce changelog.
ExceptionTableWrite withMetricRegistry(MetricRegistry registry)
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.