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 for
SourceOperator.- See Also:
-
Field Summary
Fields inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperatorFactory
chainingStrategy, processingTimeService -
Constructor Summary
ConstructorsConstructorDescriptionSourceOperatorFactory(org.apache.flink.api.connector.source.Source<OUT, ?, ?> source, org.apache.flink.api.common.eventtime.WatermarkStrategy<OUT> watermarkStrategy) SourceOperatorFactory(org.apache.flink.api.connector.source.Source<OUT, ?, ?> source, org.apache.flink.api.common.eventtime.WatermarkStrategy<OUT> watermarkStrategy, boolean emitProgressiveWatermarks) SourceOperatorFactory(org.apache.flink.api.connector.source.Source<OUT, ?, ?> source, org.apache.flink.api.common.eventtime.WatermarkStrategy<OUT> watermarkStrategy, boolean emitProgressiveWatermarks, int numCoordinatorWorkerThread) -
Method Summary
Modifier and TypeMethodDescription<T extends StreamOperator<OUT>>
TcreateStreamOperator(StreamOperatorParameters<OUT> parameters) The implementation should return an instance ofOperatorEventHandler.org.apache.flink.api.connector.source.BoundednessgetCoordinatorProvider(String operatorName, OperatorID operatorID) Get the operator coordinator provider for this operator.Set<? extends org.apache.flink.api.common.watermark.WatermarkDeclaration>Class<? extends StreamOperator>getStreamOperatorClass(ClassLoader classLoader) Returns the runtime class of the stream operator.booleanIf the stream operator need access to the output type information atStreamGraphgeneration.booleanIs this factory forStreamSource.voidsetCoordinatorListeningID(String coordinatorListeningID) voidsetOutputType(org.apache.flink.api.common.typeinfo.TypeInformation<OUT> type, org.apache.flink.api.common.ExecutionConfig executionConfig) 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 theStreamGraphis generated.Methods inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperatorFactory
getChainingStrategy, getMailboxExecutor, setChainingStrategy, setMailboxExecutor, setProcessingTimeServiceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.streaming.runtime.tasks.ProcessingTimeServiceAware
setProcessingTimeServiceMethods inherited from interface org.apache.flink.streaming.api.operators.StreamOperatorFactory
getChainingStrategy, getOperatorAttributes, isInputTypeConfigurable, isLegacySource, setChainingStrategy, setInputType
-
Constructor Details
-
SourceOperatorFactory
-
SourceOperatorFactory
-
SourceOperatorFactory
-
-
Method Details
-
getBoundedness
public org.apache.flink.api.connector.source.Boundedness getBoundedness() -
setCoordinatorListeningID
-
createStreamOperator
public <T extends StreamOperator<OUT>> T createStreamOperator(StreamOperatorParameters<OUT> parameters) Description copied from interface:CoordinatedOperatorFactoryThe implementation should return an instance ofOperatorEventHandler.- Specified by:
createStreamOperatorin interfaceCoordinatedOperatorFactory<OUT>- Specified by:
createStreamOperatorin interfaceStreamOperatorFactory<OUT>
-
getCoordinatorProvider
public OperatorCoordinator.Provider getCoordinatorProvider(String operatorName, OperatorID operatorID) Description copied from interface:CoordinatedOperatorFactoryGet the operator coordinator provider for this operator.- Specified by:
getCoordinatorProviderin interfaceCoordinatedOperatorFactory<OUT>- Parameters:
operatorName- the name of the operator.operatorID- the id of the operator.- Returns:
- the provider of the
OperatorCoordinatorfor this operator.
-
getStreamOperatorClass
Description copied from interface:StreamOperatorFactoryReturns the runtime class of the stream operator.- Specified by:
getStreamOperatorClassin interfaceStreamOperatorFactory<OUT>
-
isStreamSource
public boolean isStreamSource()Description copied from interface:StreamOperatorFactoryIs this factory forStreamSource.- Specified by:
isStreamSourcein interfaceStreamOperatorFactory<OUT>
-
isOutputTypeConfigurable
public boolean isOutputTypeConfigurable()Description copied from interface:StreamOperatorFactoryIf the stream operator need access to the output type information atStreamGraphgeneration. 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:
isOutputTypeConfigurablein interfaceStreamOperatorFactory<OUT>
-
setOutputType
public void setOutputType(org.apache.flink.api.common.typeinfo.TypeInformation<OUT> type, org.apache.flink.api.common.ExecutionConfig executionConfig) Description copied from interface:StreamOperatorFactoryIs 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 theStreamGraphis generated. The method is called with the outputTypeInformationwhich is also used for theStreamTaskoutput serializer.- Specified by:
setOutputTypein interfaceStreamOperatorFactory<OUT>- Parameters:
type- Output type information of theStreamTaskexecutionConfig- Execution configuration
-
getSourceWatermarkDeclarations
public Set<? extends org.apache.flink.api.common.watermark.WatermarkDeclaration> getSourceWatermarkDeclarations()
-