public class DataTableStreamScan extends Object implements StreamDataTableScan
StreamTableScan
implementation for streaming planning.TableScan.Plan
Modifier and Type | Field and Description |
---|---|
protected SnapshotReader |
snapshotReader |
Constructor and Description |
---|
DataTableStreamScan(CoreOptions options,
SnapshotReader snapshotReader,
SnapshotManager snapshotManager,
ChangelogManager changelogManager,
boolean supportStreamingReadOverwrite,
DefaultValueAssigner defaultValueAssigner) |
Modifier and Type | Method and Description |
---|---|
Long |
checkpoint()
Checkpoint to return next snapshot id.
|
protected BoundedChecker |
createBoundedChecker() |
protected FollowUpScanner |
createFollowUpScanner() |
protected StartingScanner |
createStartingScanner(boolean isStreaming) |
org.apache.paimon.table.source.AbstractDataTableScan |
dropStats() |
protected SnapshotReader.Plan |
handleOverwriteSnapshot(Snapshot snapshot) |
List<PartitionEntry> |
listPartitionEntries() |
void |
notifyCheckpointComplete(Long nextSnapshot)
Notifies the checkpoint complete with next snapshot id.
|
CoreOptions |
options() |
TableScan.Plan |
plan()
Plan splits, throws
EndOfScanException if the scan is ended. |
void |
restore(Long nextSnapshotId)
Restore from checkpoint next snapshot id.
|
void |
restore(Long nextSnapshotId,
boolean scanAllSnapshot)
Restore from checkpoint next snapshot id with scan kind.
|
StartingContext |
startingContext() |
Long |
watermark()
Current watermark for consumed snapshot.
|
org.apache.paimon.table.source.AbstractDataTableScan |
withBucket(int bucket) |
org.apache.paimon.table.source.AbstractDataTableScan |
withBucketFilter(Filter<Integer> bucketFilter) |
DataTableStreamScan |
withFilter(Predicate predicate) |
org.apache.paimon.table.source.AbstractDataTableScan |
withLevelFilter(Filter<Integer> levelFilter) |
org.apache.paimon.table.source.AbstractDataTableScan |
withMetricsRegistry(MetricRegistry metricsRegistry) |
org.apache.paimon.table.source.AbstractDataTableScan |
withPartitionFilter(List<BinaryRow> partitions) |
org.apache.paimon.table.source.AbstractDataTableScan |
withPartitionFilter(Map<String,String> partitionSpec) |
org.apache.paimon.table.source.AbstractDataTableScan |
withPartitionsFilter(List<Map<String,String>> partitions) |
DataTableScan |
withShard(int indexOfThisSubtask,
int numberOfParallelSubtasks)
Specify the shard to be read, and allocate sharded files to read records.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dropStats, withBucketFilter, withLevelFilter, withLimit, withMetricsRegistry, withPartitionFilter, withPartitionFilter, withPartitionsFilter
listPartitions
protected final SnapshotReader snapshotReader
public DataTableStreamScan(CoreOptions options, SnapshotReader snapshotReader, SnapshotManager snapshotManager, ChangelogManager changelogManager, boolean supportStreamingReadOverwrite, DefaultValueAssigner defaultValueAssigner)
public DataTableStreamScan withFilter(Predicate predicate)
withFilter
in interface InnerTableScan
public StartingContext startingContext()
startingContext
in interface StreamDataTableScan
public TableScan.Plan plan()
TableScan
EndOfScanException
if the scan is ended.public List<PartitionEntry> listPartitionEntries()
listPartitionEntries
in interface TableScan
@Nullable protected SnapshotReader.Plan handleOverwriteSnapshot(Snapshot snapshot)
protected FollowUpScanner createFollowUpScanner()
protected BoundedChecker createBoundedChecker()
@Nullable public Long checkpoint()
StreamTableScan
checkpoint
in interface StreamTableScan
checkpoint
in interface Restorable<Long>
@Nullable public Long watermark()
StreamTableScan
watermark
in interface StreamTableScan
public void restore(@Nullable Long nextSnapshotId)
StreamTableScan
restore
in interface StreamTableScan
restore
in interface Restorable<Long>
public void restore(@Nullable Long nextSnapshotId, boolean scanAllSnapshot)
StreamDataTableScan
restore
in interface StreamDataTableScan
public void notifyCheckpointComplete(@Nullable Long nextSnapshot)
StreamTableScan
notifyCheckpointComplete
in interface StreamTableScan
public DataTableScan withShard(int indexOfThisSubtask, int numberOfParallelSubtasks)
DataTableScan
withShard
in interface DataTableScan
@VisibleForTesting public org.apache.paimon.table.source.AbstractDataTableScan withBucket(int bucket)
public org.apache.paimon.table.source.AbstractDataTableScan withBucketFilter(Filter<Integer> bucketFilter)
withBucketFilter
in interface InnerTableScan
public org.apache.paimon.table.source.AbstractDataTableScan withPartitionFilter(Map<String,String> partitionSpec)
withPartitionFilter
in interface InnerTableScan
public org.apache.paimon.table.source.AbstractDataTableScan withPartitionFilter(List<BinaryRow> partitions)
withPartitionFilter
in interface InnerTableScan
public org.apache.paimon.table.source.AbstractDataTableScan withPartitionsFilter(List<Map<String,String>> partitions)
withPartitionsFilter
in interface InnerTableScan
public org.apache.paimon.table.source.AbstractDataTableScan withLevelFilter(Filter<Integer> levelFilter)
withLevelFilter
in interface InnerTableScan
public org.apache.paimon.table.source.AbstractDataTableScan withMetricsRegistry(MetricRegistry metricsRegistry)
withMetricsRegistry
in interface InnerTableScan
public org.apache.paimon.table.source.AbstractDataTableScan dropStats()
dropStats
in interface InnerTableScan
public CoreOptions options()
protected StartingScanner createStartingScanner(boolean isStreaming)
Copyright © 2023–2025 The Apache Software Foundation. All rights reserved.