public class DataTableStreamScan extends AbstractDataTableScan implements StreamDataTableScan
StreamTableScan
implementation for streaming planning.TableScan.Plan
snapshotReader
Constructor and Description |
---|
DataTableStreamScan(CoreOptions options,
SnapshotReader snapshotReader,
SnapshotManager snapshotManager,
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 SnapshotReader.Plan |
handleOverwriteSnapshot(Snapshot snapshot) |
List<PartitionEntry> |
listPartitionEntries() |
void |
notifyCheckpointComplete(Long nextSnapshot)
Notifies the checkpoint complete with next snapshot id.
|
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.
|
DataTableStreamScan |
withFilter(Predicate predicate) |
DataTableScan |
withShard(int indexOfThisSubtask,
int numberOfParallelSubtasks)
Specify the shard to be read, and allocate sharded files to read records.
|
createStartingScanner, dropStats, options, withBucket, withBucketFilter, withLevelFilter, withMetricsRegistry, withPartitionFilter, withPartitionFilter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dropStats, withBucketFilter, withLevelFilter, withLimit, withMetricsRegistry, withPartitionFilter, withPartitionFilter
listPartitions
public DataTableStreamScan(CoreOptions options, SnapshotReader snapshotReader, SnapshotManager snapshotManager, 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
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.