@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. |
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)
Set
MetricRegistry to table write. |
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.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)
MetricRegistry to table write.Copyright © 2023–2025 The Apache Software Foundation. All rights reserved.