Class LazyFlinkSourceSplitEnumerator<T>
java.lang.Object
org.apache.beam.runners.flink.translation.wrappers.streaming.io.source.LazyFlinkSourceSplitEnumerator<T>
- Type Parameters:
T
- The output type of the encapsulated BeamSource
.
- All Implemented Interfaces:
AutoCloseable
,org.apache.flink.api.common.state.CheckpointListener
,org.apache.flink.api.connector.source.SplitEnumerator<FlinkSourceSplit<T>,
Map<Integer, List<FlinkSourceSplit<T>>>>
public class LazyFlinkSourceSplitEnumerator<T>
extends Object
implements org.apache.flink.api.connector.source.SplitEnumerator<FlinkSourceSplit<T>,Map<Integer,List<FlinkSourceSplit<T>>>>
-
Constructor Summary
ConstructorsConstructorDescriptionLazyFlinkSourceSplitEnumerator
(org.apache.flink.api.connector.source.SplitEnumeratorContext<FlinkSourceSplit<T>> context, Source<T> beamSource, PipelineOptions pipelineOptions, int numSplits, boolean splitInitialized) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addReader
(int subtaskId) void
addSplitsBack
(List<FlinkSourceSplit<T>> splits, int subtaskId) void
close()
void
handleSplitRequest
(int subtask, String hostname) void
snapshotState
(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
handleSourceEvent, notifyCheckpointComplete
-
Constructor Details
-
LazyFlinkSourceSplitEnumerator
public LazyFlinkSourceSplitEnumerator(org.apache.flink.api.connector.source.SplitEnumeratorContext<FlinkSourceSplit<T>> context, Source<T> beamSource, PipelineOptions pipelineOptions, int numSplits, boolean splitInitialized)
-
-
Method Details
-
start
public void start()- Specified by:
start
in interfaceorg.apache.flink.api.connector.source.SplitEnumerator<FlinkSourceSplit<T>,
Map<Integer, List<FlinkSourceSplit<T>>>>
-
initializeSplits
public void initializeSplits() -
handleSplitRequest
- Specified by:
handleSplitRequest
in interfaceorg.apache.flink.api.connector.source.SplitEnumerator<FlinkSourceSplit<T>,
Map<Integer, List<FlinkSourceSplit<T>>>>
-
addSplitsBack
- Specified by:
addSplitsBack
in interfaceorg.apache.flink.api.connector.source.SplitEnumerator<FlinkSourceSplit<T>,
Map<Integer, List<FlinkSourceSplit<T>>>>
-
addReader
public void addReader(int subtaskId) - Specified by:
addReader
in interfaceorg.apache.flink.api.connector.source.SplitEnumerator<FlinkSourceSplit<T>,
Map<Integer, List<FlinkSourceSplit<T>>>>
-
snapshotState
- Specified by:
snapshotState
in interfaceorg.apache.flink.api.connector.source.SplitEnumerator<FlinkSourceSplit<T>,
Map<Integer, List<FlinkSourceSplit<T>>>> - Throws:
Exception
-
snapshotState
- Throws:
Exception
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceorg.apache.flink.api.connector.source.SplitEnumerator<FlinkSourceSplit<T>,
Map<Integer, List<FlinkSourceSplit<T>>>> - Throws:
IOException
-