public class AlignedContinuousFileSplitEnumerator extends ContinuousFileSplitEnumerator
There are two alignment cases here:
AlignedSourceReader
will not request splits until checkpoint is triggered.
ContinuousFileSplitEnumerator.PlanWithNextSnapshotId
consumerProgressCalculator, context, discoveryInterval, finished, nextSnapshotId, readersAwaitingSplit, scan, splitAssigner, splitGenerator
Constructor and Description |
---|
AlignedContinuousFileSplitEnumerator(org.apache.flink.api.connector.source.SplitEnumeratorContext<FileStoreSourceSplit> context,
Collection<FileStoreSourceSplit> remainSplits,
Long nextSnapshotId,
long discoveryInterval,
StreamTableScan scan,
BucketMode bucketMode,
long alignTimeout,
int splitPerTaskMax,
boolean shuffleBucketWithPartition) |
Modifier and Type | Method and Description |
---|---|
protected void |
addSplits(Collection<FileStoreSourceSplit> splits) |
void |
addSplitsBack(List<FileStoreSourceSplit> splits,
int subtaskId) |
void |
close() |
protected SplitAssigner |
createSplitAssigner(BucketMode bucketMode) |
protected boolean |
noMoreSplits() |
void |
notifyCheckpointAborted(long checkpointId) |
void |
notifyCheckpointComplete(long checkpointId) |
protected void |
processDiscoveredSplits(Optional<ContinuousFileSplitEnumerator.PlanWithNextSnapshotId> ignore,
Throwable error) |
protected Optional<ContinuousFileSplitEnumerator.PlanWithNextSnapshotId> |
scanNextSnapshot() |
PendingSplitsCheckpoint |
snapshotState(long checkpointId) |
addReader, assignSplits, assignSuggestedTask, handleSourceEvent, handleSplitRequest, start
public AlignedContinuousFileSplitEnumerator(org.apache.flink.api.connector.source.SplitEnumeratorContext<FileStoreSourceSplit> context, Collection<FileStoreSourceSplit> remainSplits, @Nullable Long nextSnapshotId, long discoveryInterval, StreamTableScan scan, BucketMode bucketMode, long alignTimeout, int splitPerTaskMax, boolean shuffleBucketWithPartition)
protected void addSplits(Collection<FileStoreSourceSplit> splits)
addSplits
in class ContinuousFileSplitEnumerator
public void close() throws IOException
close
in interface AutoCloseable
close
in interface org.apache.flink.api.connector.source.SplitEnumerator<FileStoreSourceSplit,PendingSplitsCheckpoint>
close
in class ContinuousFileSplitEnumerator
IOException
public void addSplitsBack(List<FileStoreSourceSplit> splits, int subtaskId)
addSplitsBack
in interface org.apache.flink.api.connector.source.SplitEnumerator<FileStoreSourceSplit,PendingSplitsCheckpoint>
addSplitsBack
in class ContinuousFileSplitEnumerator
public PendingSplitsCheckpoint snapshotState(long checkpointId) throws Exception
snapshotState
in interface org.apache.flink.api.connector.source.SplitEnumerator<FileStoreSourceSplit,PendingSplitsCheckpoint>
snapshotState
in class ContinuousFileSplitEnumerator
Exception
public void notifyCheckpointAborted(long checkpointId)
public void notifyCheckpointComplete(long checkpointId)
notifyCheckpointComplete
in interface org.apache.flink.api.common.state.CheckpointListener
notifyCheckpointComplete
in interface org.apache.flink.api.connector.source.SplitEnumerator<FileStoreSourceSplit,PendingSplitsCheckpoint>
notifyCheckpointComplete
in class ContinuousFileSplitEnumerator
protected Optional<ContinuousFileSplitEnumerator.PlanWithNextSnapshotId> scanNextSnapshot()
scanNextSnapshot
in class ContinuousFileSplitEnumerator
protected void processDiscoveredSplits(Optional<ContinuousFileSplitEnumerator.PlanWithNextSnapshotId> ignore, Throwable error)
processDiscoveredSplits
in class ContinuousFileSplitEnumerator
protected boolean noMoreSplits()
noMoreSplits
in class ContinuousFileSplitEnumerator
protected SplitAssigner createSplitAssigner(BucketMode bucketMode)
createSplitAssigner
in class ContinuousFileSplitEnumerator
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.