SplitT - source split typepublic interface SourceSplitEnumerator<SplitT extends SourceSplit,StateT> extends AutoCloseable, CheckpointListener
SourceSplitEnumerator is responsible for enumerating the splits of a source. It will
run at master.| 限定符和类型 | 接口和说明 |
|---|---|
static interface |
SourceSplitEnumerator.Context<SplitT extends SourceSplit> |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addSplitsBack(List<SplitT> splits,
int subtaskId)
Add a split back to the split enumerator.
|
void |
close()
Called to close the enumerator, in case it holds on to any resources, like threads or network
connections.
|
int |
currentUnassignedSplitSize() |
default void |
handleSourceEvent(int subtaskId,
SourceEvent sourceEvent)
Handle the source event from
SourceReader. |
void |
handleSplitRequest(int subtaskId) |
void |
open() |
void |
registerReader(int subtaskId) |
void |
run()
The method is executed by the engine only once.
|
StateT |
snapshotState(long checkpointId)
If the source is bounded, checkpoint is not triggered.
|
notifyCheckpointAborted, notifyCheckpointCompletevoid open()
void close()
throws IOException
close 在接口中 AutoCloseableIOExceptionvoid addSplitsBack(List<SplitT> splits, int subtaskId)
SourceReader
fails and there are splits assigned to it after the last successful checkpoint.splits - The split to add back to the enumerator for reassignment.subtaskId - The id of the subtask to which the returned splits belong.int currentUnassignedSplitSize()
void handleSplitRequest(int subtaskId)
void registerReader(int subtaskId)
StateT snapshotState(long checkpointId) throws Exception
Exceptiondefault void handleSourceEvent(int subtaskId,
SourceEvent sourceEvent)
SourceReader.subtaskId - The id of the subtask to which the source event from.sourceEvent - source event.Copyright © 2024 The Apache Software Foundation. All rights reserved.