public class ContinuousFileSplitEnumerator extends Object implements org.apache.flink.api.connector.source.SplitEnumerator<FileStoreSourceSplit,PendingSplitsCheckpoint>
Modifier and Type | Class and Description |
---|---|
protected static class |
ContinuousFileSplitEnumerator.PlanWithNextSnapshotId
The result of scan.
|
Modifier and Type | Field and Description |
---|---|
protected ConsumerProgressCalculator |
consumerProgressCalculator |
protected org.apache.flink.api.connector.source.SplitEnumeratorContext<FileStoreSourceSplit> |
context |
protected long |
discoveryInterval |
protected boolean |
finished |
protected Long |
nextSnapshotId |
protected Set<Integer> |
readersAwaitingSplit |
protected StreamTableScan |
scan |
protected SplitAssigner |
splitAssigner |
protected FileStoreSourceSplitGenerator |
splitGenerator |
Constructor and Description |
---|
ContinuousFileSplitEnumerator(org.apache.flink.api.connector.source.SplitEnumeratorContext<FileStoreSourceSplit> context,
Collection<FileStoreSourceSplit> remainSplits,
Long nextSnapshotId,
long discoveryInterval,
StreamTableScan scan,
BucketMode bucketMode,
int splitMaxPerTask,
boolean shuffleBucketWithPartition) |
protected final org.apache.flink.api.connector.source.SplitEnumeratorContext<FileStoreSourceSplit> context
protected final long discoveryInterval
protected final FileStoreSourceSplitGenerator splitGenerator
protected final StreamTableScan scan
protected final SplitAssigner splitAssigner
protected final ConsumerProgressCalculator consumerProgressCalculator
protected boolean finished
public ContinuousFileSplitEnumerator(org.apache.flink.api.connector.source.SplitEnumeratorContext<FileStoreSourceSplit> context, Collection<FileStoreSourceSplit> remainSplits, @Nullable Long nextSnapshotId, long discoveryInterval, StreamTableScan scan, BucketMode bucketMode, int splitMaxPerTask, boolean shuffleBucketWithPartition)
protected void addSplits(Collection<FileStoreSourceSplit> splits)
public void start()
start
in interface org.apache.flink.api.connector.source.SplitEnumerator<FileStoreSourceSplit,PendingSplitsCheckpoint>
public void close() throws IOException
close
in interface AutoCloseable
close
in interface org.apache.flink.api.connector.source.SplitEnumerator<FileStoreSourceSplit,PendingSplitsCheckpoint>
IOException
public void addReader(int subtaskId)
addReader
in interface org.apache.flink.api.connector.source.SplitEnumerator<FileStoreSourceSplit,PendingSplitsCheckpoint>
public void handleSplitRequest(int subtaskId, @Nullable String requesterHostname)
handleSplitRequest
in interface org.apache.flink.api.connector.source.SplitEnumerator<FileStoreSourceSplit,PendingSplitsCheckpoint>
public void handleSourceEvent(int subtaskId, org.apache.flink.api.connector.source.SourceEvent sourceEvent)
handleSourceEvent
in interface org.apache.flink.api.connector.source.SplitEnumerator<FileStoreSourceSplit,PendingSplitsCheckpoint>
public void addSplitsBack(List<FileStoreSourceSplit> splits, int subtaskId)
addSplitsBack
in interface org.apache.flink.api.connector.source.SplitEnumerator<FileStoreSourceSplit,PendingSplitsCheckpoint>
public PendingSplitsCheckpoint snapshotState(long checkpointId) throws Exception
snapshotState
in interface org.apache.flink.api.connector.source.SplitEnumerator<FileStoreSourceSplit,PendingSplitsCheckpoint>
Exception
public void notifyCheckpointComplete(long checkpointId) throws Exception
notifyCheckpointComplete
in interface org.apache.flink.api.common.state.CheckpointListener
notifyCheckpointComplete
in interface org.apache.flink.api.connector.source.SplitEnumerator<FileStoreSourceSplit,PendingSplitsCheckpoint>
Exception
protected Optional<ContinuousFileSplitEnumerator.PlanWithNextSnapshotId> scanNextSnapshot()
protected void processDiscoveredSplits(Optional<ContinuousFileSplitEnumerator.PlanWithNextSnapshotId> planWithNextSnapshotIdOptional, Throwable error)
protected void assignSplits()
handleSplitRequest(int, java.lang.String)
and processDiscoveredSplits(java.util.Optional<org.apache.paimon.flink.source.ContinuousFileSplitEnumerator.PlanWithNextSnapshotId>, java.lang.Throwable)
have thread conflicts.protected int assignSuggestedTask(FileStoreSourceSplit split)
protected SplitAssigner createSplitAssigner(BucketMode bucketMode)
protected boolean noMoreSplits()
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.