Class ContinuousIcebergEnumerator
- java.lang.Object
-
- org.apache.iceberg.flink.source.enumerator.ContinuousIcebergEnumerator
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.apache.flink.api.common.state.CheckpointListener
,org.apache.flink.api.connector.source.SplitEnumerator<IcebergSourceSplit,IcebergEnumeratorState>
@Internal public class ContinuousIcebergEnumerator extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ContinuousIcebergEnumerator(org.apache.flink.api.connector.source.SplitEnumeratorContext<IcebergSourceSplit> enumeratorContext, SplitAssigner assigner, ScanContext scanContext, ContinuousSplitPlanner splitPlanner, IcebergEnumeratorState enumState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addReader(int subtaskId)
void
addSplitsBack(java.util.List<IcebergSourceSplit> splits, int subtaskId)
void
close()
void
handleSourceEvent(int subtaskId, org.apache.flink.api.connector.source.SourceEvent sourceEvent)
void
handleSplitRequest(int subtaskId, java.lang.String requesterHostname)
protected boolean
shouldWaitForMoreSplits()
return true if enumerator should wait for splits like in the continuous enumerator caseIcebergEnumeratorState
snapshotState(long checkpointId)
void
start()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Constructor Detail
-
ContinuousIcebergEnumerator
public ContinuousIcebergEnumerator(org.apache.flink.api.connector.source.SplitEnumeratorContext<IcebergSourceSplit> enumeratorContext, SplitAssigner assigner, ScanContext scanContext, ContinuousSplitPlanner splitPlanner, @Nullable IcebergEnumeratorState enumState)
-
-
Method Detail
-
start
public void start()
- Specified by:
start
in interfaceorg.apache.flink.api.connector.source.SplitEnumerator<IcebergSourceSplit,IcebergEnumeratorState>
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceorg.apache.flink.api.connector.source.SplitEnumerator<IcebergSourceSplit,IcebergEnumeratorState>
- Throws:
java.io.IOException
-
shouldWaitForMoreSplits
protected boolean shouldWaitForMoreSplits()
return true if enumerator should wait for splits like in the continuous enumerator case
-
snapshotState
public IcebergEnumeratorState snapshotState(long checkpointId)
-
handleSplitRequest
public void handleSplitRequest(int subtaskId, @Nullable java.lang.String requesterHostname)
- 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>
-
addSplitsBack
public void addSplitsBack(java.util.List<IcebergSourceSplit> splits, int subtaskId)
- 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>
-
-