Class StaticIcebergEnumerator
java.lang.Object
org.apache.iceberg.flink.source.enumerator.StaticIcebergEnumerator
- All Implemented Interfaces:
AutoCloseable
,org.apache.flink.api.common.state.CheckpointListener
,org.apache.flink.api.connector.source.SplitEnumerator<IcebergSourceSplit,
,IcebergEnumeratorState> org.apache.flink.api.connector.source.SupportsHandleExecutionAttemptSourceEvent
One-time split enumeration at the start-up for batch execution
-
Constructor Summary
ConstructorDescriptionStaticIcebergEnumerator
(org.apache.flink.api.connector.source.SplitEnumeratorContext<IcebergSourceSplit> enumeratorContext, SplitAssigner assigner) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addReader
(int subtaskId) void
addSplitsBack
(List<IcebergSourceSplit> splits, int subtaskId) void
close()
void
handleSourceEvent
(int subTaskId, int attemptNumber, org.apache.flink.api.connector.source.SourceEvent sourceEvent) void
handleSourceEvent
(int subtaskId, org.apache.flink.api.connector.source.SourceEvent sourceEvent) void
handleSplitRequest
(int subtaskId, String requesterHostname) protected boolean
return true if enumerator should wait for splits like in the continuous enumerator casesnapshotState
(long checkpointId) void
start()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.flink.api.common.state.CheckpointListener
notifyCheckpointAborted
Methods inherited from interface org.apache.flink.api.connector.source.SplitEnumerator
notifyCheckpointComplete
-
Constructor Details
-
StaticIcebergEnumerator
public StaticIcebergEnumerator(org.apache.flink.api.connector.source.SplitEnumeratorContext<IcebergSourceSplit> enumeratorContext, SplitAssigner assigner)
-
-
Method Details
-
start
public void start()- Specified by:
start
in interfaceorg.apache.flink.api.connector.source.SplitEnumerator<IcebergSourceSplit,
IcebergEnumeratorState>
-
shouldWaitForMoreSplits
protected boolean shouldWaitForMoreSplits()return true if enumerator should wait for splits like in the continuous enumerator case -
snapshotState
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceorg.apache.flink.api.connector.source.SplitEnumerator<IcebergSourceSplit,
IcebergEnumeratorState> - Throws:
IOException
-
handleSplitRequest
- Specified by:
handleSplitRequest
in interfaceorg.apache.flink.api.connector.source.SplitEnumerator<IcebergSourceSplit,
IcebergEnumeratorState>
-
handleSourceEvent
public void handleSourceEvent(int subtaskId, org.apache.flink.api.connector.source.SourceEvent sourceEvent) - Specified by:
handleSourceEvent
in interfaceorg.apache.flink.api.connector.source.SplitEnumerator<IcebergSourceSplit,
IcebergEnumeratorState>
-
handleSourceEvent
public void handleSourceEvent(int subTaskId, int attemptNumber, org.apache.flink.api.connector.source.SourceEvent sourceEvent) - Specified by:
handleSourceEvent
in interfaceorg.apache.flink.api.connector.source.SupportsHandleExecutionAttemptSourceEvent
-
addSplitsBack
- Specified by:
addSplitsBack
in interfaceorg.apache.flink.api.connector.source.SplitEnumerator<IcebergSourceSplit,
IcebergEnumeratorState>
-
addReader
public void addReader(int subtaskId) - Specified by:
addReader
in interfaceorg.apache.flink.api.connector.source.SplitEnumerator<IcebergSourceSplit,
IcebergEnumeratorState>
-