Class SourceOperatorFactory<OUT>
- java.lang.Object
-
- org.apache.flink.streaming.api.operators.AbstractStreamOperatorFactory<OUT>
-
- org.apache.flink.streaming.api.operators.SourceOperatorFactory<OUT>
-
- All Implemented Interfaces:
Serializable
,CoordinatedOperatorFactory<OUT>
,StreamOperatorFactory<OUT>
,ProcessingTimeServiceAware
public class SourceOperatorFactory<OUT> extends AbstractStreamOperatorFactory<OUT> implements CoordinatedOperatorFactory<OUT>, ProcessingTimeServiceAware
The Factory class forSourceOperator
.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperatorFactory
chainingStrategy, processingTimeService
-
-
Constructor Summary
Constructors Constructor Description SourceOperatorFactory(Source<OUT,?,?> source, WatermarkStrategy<OUT> watermarkStrategy)
SourceOperatorFactory(Source<OUT,?,?> source, WatermarkStrategy<OUT> watermarkStrategy, boolean emitProgressiveWatermarks)
SourceOperatorFactory(Source<OUT,?,?> source, WatermarkStrategy<OUT> watermarkStrategy, boolean emitProgressiveWatermarks, int numCoordinatorWorkerThread)
-
Method Summary
-
Methods inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperatorFactory
getChainingStrategy, getMailboxExecutor, setChainingStrategy, setMailboxExecutor, setProcessingTimeService
-
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.streaming.runtime.tasks.ProcessingTimeServiceAware
setProcessingTimeService
-
Methods inherited from interface org.apache.flink.streaming.api.operators.StreamOperatorFactory
getChainingStrategy, getOperatorAttributes, isInputTypeConfigurable, isLegacySource, setChainingStrategy, setInputType
-
-
-
-
Constructor Detail
-
SourceOperatorFactory
public SourceOperatorFactory(Source<OUT,?,?> source, WatermarkStrategy<OUT> watermarkStrategy)
-
SourceOperatorFactory
public SourceOperatorFactory(Source<OUT,?,?> source, WatermarkStrategy<OUT> watermarkStrategy, boolean emitProgressiveWatermarks)
-
SourceOperatorFactory
public SourceOperatorFactory(Source<OUT,?,?> source, WatermarkStrategy<OUT> watermarkStrategy, boolean emitProgressiveWatermarks, int numCoordinatorWorkerThread)
-
-
Method Detail
-
getBoundedness
public Boundedness getBoundedness()
-
setCoordinatorListeningID
public void setCoordinatorListeningID(@Nullable String coordinatorListeningID)
-
createStreamOperator
public <T extends StreamOperator<OUT>> T createStreamOperator(StreamOperatorParameters<OUT> parameters)
Description copied from interface:CoordinatedOperatorFactory
The implementation should return an instance ofOperatorEventHandler
.- Specified by:
createStreamOperator
in interfaceCoordinatedOperatorFactory<OUT>
- Specified by:
createStreamOperator
in interfaceStreamOperatorFactory<OUT>
-
getCoordinatorProvider
public OperatorCoordinator.Provider getCoordinatorProvider(String operatorName, OperatorID operatorID)
Description copied from interface:CoordinatedOperatorFactory
Get the operator coordinator provider for this operator.- Specified by:
getCoordinatorProvider
in interfaceCoordinatedOperatorFactory<OUT>
- Parameters:
operatorName
- the name of the operator.operatorID
- the id of the operator.- Returns:
- the provider of the
OperatorCoordinator
for this operator.
-
getStreamOperatorClass
public Class<? extends StreamOperator> getStreamOperatorClass(ClassLoader classLoader)
Description copied from interface:StreamOperatorFactory
Returns the runtime class of the stream operator.- Specified by:
getStreamOperatorClass
in interfaceStreamOperatorFactory<OUT>
-
isStreamSource
public boolean isStreamSource()
Description copied from interface:StreamOperatorFactory
Is this factory forStreamSource
.- Specified by:
isStreamSource
in interfaceStreamOperatorFactory<OUT>
-
isOutputTypeConfigurable
public boolean isOutputTypeConfigurable()
Description copied from interface:StreamOperatorFactory
If the stream operator need access to the output type information atStreamGraph
generation. This can be useful for cases where the output type is specified by the returns method and, thus, after the stream operator has been created.- Specified by:
isOutputTypeConfigurable
in interfaceStreamOperatorFactory<OUT>
-
setOutputType
public void setOutputType(TypeInformation<OUT> type, ExecutionConfig executionConfig)
Description copied from interface:StreamOperatorFactory
Is called by theStreamGraph.addOperator(java.lang.Integer, java.lang.String, java.lang.String, org.apache.flink.streaming.api.operators.StreamOperatorFactory<OUT>, org.apache.flink.api.common.typeinfo.TypeInformation<IN>, org.apache.flink.api.common.typeinfo.TypeInformation<OUT>, java.lang.String)
method when theStreamGraph
is generated. The method is called with the outputTypeInformation
which is also used for theStreamTask
output serializer.- Specified by:
setOutputType
in interfaceStreamOperatorFactory<OUT>
- Parameters:
type
- Output type information of theStreamTask
executionConfig
- Execution configuration
-
-