Class FlinkSource<T,OutputT>
java.lang.Object
org.apache.beam.runners.flink.translation.wrappers.streaming.io.source.FlinkSource<T,OutputT>
- Type Parameters:
T- The data type of the records emitted by the raw Beam sources.OutputT- The data type of the records emitted by the Flink Source.
- All Implemented Interfaces:
Serializable,org.apache.flink.api.connector.source.Source<OutputT,,FlinkSourceSplit<T>, Map<Integer, List<FlinkSourceSplit<T>>>> org.apache.flink.api.connector.source.SourceReaderFactory<OutputT,FlinkSourceSplit<T>>
- Direct Known Subclasses:
FlinkBoundedSource,FlinkUnboundedSource
public abstract class FlinkSource<T,OutputT>
extends Object
implements org.apache.flink.api.connector.source.Source<OutputT,FlinkSourceSplit<T>,Map<Integer,List<FlinkSourceSplit<T>>>>
The base class for
FlinkBoundedSource and FlinkUnboundedSource.- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.flink.api.connector.source.Boundednessprotected final org.apache.beam.runners.core.construction.SerializablePipelineOptionsprotected final String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFlinkSource(String stepName, Source<T> beamSource, org.apache.beam.runners.core.construction.SerializablePipelineOptions serializablePipelineOptions, org.apache.flink.api.connector.source.Boundedness boundedness, int numSplits) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> FlinkBoundedSource<T> bounded(String stepName, BoundedSource<T> boundedSource, org.apache.beam.runners.core.construction.SerializablePipelineOptions serializablePipelineOptions, int numSplits) static FlinkBoundedSource<byte[]> org.apache.flink.api.connector.source.SplitEnumerator<FlinkSourceSplit<T>, Map<Integer, List<FlinkSourceSplit<T>>>> createEnumerator(org.apache.flink.api.connector.source.SplitEnumeratorContext<FlinkSourceSplit<T>> enumContext) org.apache.flink.api.connector.source.SplitEnumerator<FlinkSourceSplit<T>, Map<Integer, List<FlinkSourceSplit<T>>>> createEnumerator(org.apache.flink.api.connector.source.SplitEnumeratorContext<FlinkSourceSplit<T>> enumContext, boolean splitInitialized) org.apache.flink.api.connector.source.Boundednessorg.apache.flink.core.io.SimpleVersionedSerializer<Map<Integer, List<FlinkSourceSplit<T>>>> intorg.apache.flink.core.io.SimpleVersionedSerializer<FlinkSourceSplit<T>> org.apache.flink.api.connector.source.SplitEnumerator<FlinkSourceSplit<T>, Map<Integer, List<FlinkSourceSplit<T>>>> restoreEnumerator(org.apache.flink.api.connector.source.SplitEnumeratorContext<FlinkSourceSplit<T>> enumContext, Map<Integer, List<FlinkSourceSplit<T>>> checkpoint) static <T> FlinkUnboundedSource<T> unbounded(String stepName, UnboundedSource<T, ?> source, org.apache.beam.runners.core.construction.SerializablePipelineOptions serializablePipelineOptions, int numSplits) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.api.connector.source.SourceReaderFactory
createReader
-
Field Details
-
stepName
-
beamSource
-
boundedness
protected final org.apache.flink.api.connector.source.Boundedness boundedness -
serializablePipelineOptions
protected final org.apache.beam.runners.core.construction.SerializablePipelineOptions serializablePipelineOptions
-
-
Constructor Details
-
FlinkSource
-
-
Method Details
-
bounded
public static <T> FlinkBoundedSource<T> bounded(String stepName, BoundedSource<T> boundedSource, org.apache.beam.runners.core.construction.SerializablePipelineOptions serializablePipelineOptions, int numSplits) -
unbounded
public static <T> FlinkUnboundedSource<T> unbounded(String stepName, UnboundedSource<T, ?> source, org.apache.beam.runners.core.construction.SerializablePipelineOptions serializablePipelineOptions, int numSplits) -
boundedImpulse
-
getBoundedness
public org.apache.flink.api.connector.source.Boundedness getBoundedness()- Specified by:
getBoundednessin interfaceorg.apache.flink.api.connector.source.Source<OutputT,FlinkSourceSplit<T>, Map<Integer, List<FlinkSourceSplit<T>>>>
-
createEnumerator
public org.apache.flink.api.connector.source.SplitEnumerator<FlinkSourceSplit<T>,Map<Integer, createEnumeratorList<FlinkSourceSplit<T>>>> (org.apache.flink.api.connector.source.SplitEnumeratorContext<FlinkSourceSplit<T>> enumContext) throws Exception - Specified by:
createEnumeratorin interfaceorg.apache.flink.api.connector.source.Source<OutputT,FlinkSourceSplit<T>, Map<Integer, List<FlinkSourceSplit<T>>>> - Throws:
Exception
-
createEnumerator
public org.apache.flink.api.connector.source.SplitEnumerator<FlinkSourceSplit<T>,Map<Integer, createEnumeratorList<FlinkSourceSplit<T>>>> (org.apache.flink.api.connector.source.SplitEnumeratorContext<FlinkSourceSplit<T>> enumContext, boolean splitInitialized) throws Exception - Throws:
Exception
-
restoreEnumerator
public org.apache.flink.api.connector.source.SplitEnumerator<FlinkSourceSplit<T>,Map<Integer, restoreEnumeratorList<FlinkSourceSplit<T>>>> (org.apache.flink.api.connector.source.SplitEnumeratorContext<FlinkSourceSplit<T>> enumContext, Map<Integer, List<FlinkSourceSplit<T>>> checkpoint) throws Exception- Specified by:
restoreEnumeratorin interfaceorg.apache.flink.api.connector.source.Source<OutputT,FlinkSourceSplit<T>, Map<Integer, List<FlinkSourceSplit<T>>>> - Throws:
Exception
-
getSplitSerializer
- Specified by:
getSplitSerializerin interfaceorg.apache.flink.api.connector.source.Source<OutputT,FlinkSourceSplit<T>, Map<Integer, List<FlinkSourceSplit<T>>>>
-
getEnumeratorCheckpointSerializer
public org.apache.flink.core.io.SimpleVersionedSerializer<Map<Integer,List<FlinkSourceSplit<T>>>> getEnumeratorCheckpointSerializer()- Specified by:
getEnumeratorCheckpointSerializerin interfaceorg.apache.flink.api.connector.source.Source<OutputT,FlinkSourceSplit<T>, Map<Integer, List<FlinkSourceSplit<T>>>>
-
getNumSplits
public int getNumSplits()
-