public class StaticFileStoreSplitEnumerator extends Object implements org.apache.flink.api.connector.source.SplitEnumerator<FileStoreSourceSplit,PendingSplitsCheckpoint>, SupportsHandleExecutionAttemptSourceEvent
SplitEnumerator
implementation for StaticFileStoreSource
input.Constructor and Description |
---|
StaticFileStoreSplitEnumerator(org.apache.flink.api.connector.source.SplitEnumeratorContext<FileStoreSourceSplit> context,
Snapshot snapshot,
SplitAssigner splitAssigner) |
StaticFileStoreSplitEnumerator(org.apache.flink.api.connector.source.SplitEnumeratorContext<FileStoreSourceSplit> context,
Snapshot snapshot,
SplitAssigner splitAssigner,
DynamicPartitionFilteringInfo dynamicPartitionFilteringInfo) |
Modifier and Type | Method and Description |
---|---|
void |
addReader(int subtaskId) |
void |
addSplitsBack(List<FileStoreSourceSplit> backSplits,
int subtaskId) |
void |
close() |
SplitAssigner |
getSplitAssigner() |
void |
handleSourceEvent(int subtaskId,
int attemptNumber,
org.apache.flink.api.connector.source.SourceEvent sourceEvent)
Handles a custom source event from the source reader.
|
void |
handleSourceEvent(int subtaskId,
org.apache.flink.api.connector.source.SourceEvent sourceEvent)
When to support a new kind of event, pay attention that whether the new event can be sent
multiple times from different attempts of one subtask.
|
void |
handleSplitRequest(int subtask,
String hostname) |
Snapshot |
snapshot() |
PendingSplitsCheckpoint |
snapshotState(long checkpointId) |
void |
start() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public StaticFileStoreSplitEnumerator(org.apache.flink.api.connector.source.SplitEnumeratorContext<FileStoreSourceSplit> context, @Nullable Snapshot snapshot, SplitAssigner splitAssigner)
public StaticFileStoreSplitEnumerator(org.apache.flink.api.connector.source.SplitEnumeratorContext<FileStoreSourceSplit> context, @Nullable Snapshot snapshot, SplitAssigner splitAssigner, @Nullable DynamicPartitionFilteringInfo dynamicPartitionFilteringInfo)
public void start()
start
in interface org.apache.flink.api.connector.source.SplitEnumerator<FileStoreSourceSplit,PendingSplitsCheckpoint>
public void handleSplitRequest(int subtask, @Nullable String hostname)
handleSplitRequest
in interface org.apache.flink.api.connector.source.SplitEnumerator<FileStoreSourceSplit,PendingSplitsCheckpoint>
public void addSplitsBack(List<FileStoreSourceSplit> backSplits, int subtaskId)
addSplitsBack
in interface org.apache.flink.api.connector.source.SplitEnumerator<FileStoreSourceSplit,PendingSplitsCheckpoint>
public void addReader(int subtaskId)
addReader
in interface org.apache.flink.api.connector.source.SplitEnumerator<FileStoreSourceSplit,PendingSplitsCheckpoint>
public PendingSplitsCheckpoint snapshotState(long checkpointId)
snapshotState
in interface org.apache.flink.api.connector.source.SplitEnumerator<FileStoreSourceSplit,PendingSplitsCheckpoint>
public void close()
close
in interface AutoCloseable
close
in interface org.apache.flink.api.connector.source.SplitEnumerator<FileStoreSourceSplit,PendingSplitsCheckpoint>
public void handleSourceEvent(int subtaskId, int attemptNumber, org.apache.flink.api.connector.source.SourceEvent sourceEvent)
SupportsHandleExecutionAttemptSourceEvent
SplitEnumerator.handleSourceEvent(int, SourceEvent)
but is aware of the subtask execution
attempt who sent this event.handleSourceEvent
in interface SupportsHandleExecutionAttemptSourceEvent
subtaskId
- the subtask id of the source reader who sent the source event.attemptNumber
- the attempt number of the source reader who sent the source event.sourceEvent
- the source event from the source reader.public void handleSourceEvent(int subtaskId, org.apache.flink.api.connector.source.SourceEvent sourceEvent)
handleSourceEvent(int, int, SourceEvent)
handleSourceEvent
in interface org.apache.flink.api.connector.source.SplitEnumerator<FileStoreSourceSplit,PendingSplitsCheckpoint>
@VisibleForTesting public SplitAssigner getSplitAssigner()
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.