Interface StreamOperatorFactory<OUT>
- Type Parameters:
OUT- The output type of the operator
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
CoordinatedOperatorFactory<OUT>,InputFormatOperatorFactory<OUT>,OneInputStreamOperatorFactory<IN,,OUT> OutputFormatOperatorFactory<IN,,OUT> TwoInputStreamOperatorFactory<IN1,,IN2, OUT> UdfStreamOperatorFactory<OUT>,YieldingOperatorFactory<OUT>
- All Known Implementing Classes:
AbstractStreamOperatorFactory,CollectSinkOperatorFactory,CommitterOperatorFactory,ContinuousFileReaderOperatorFactory,EvictingWindowOperatorFactory,SimpleInputFormatOperatorFactory,SimpleOperatorFactory,SimpleOutputFormatOperatorFactory,SimpleUdfStreamOperatorFactory,SinkWriterOperatorFactory,SourceOperatorFactory,TimestampsAndWatermarksOperatorFactory,WindowOperatorFactory
A factory to create
StreamOperator.-
Method Summary
Modifier and TypeMethodDescription<T extends StreamOperator<OUT>>
TcreateStreamOperator(StreamOperatorParameters<OUT> parameters) Create the operator.Get the chaining strategy of operator factory.default OperatorAttributesIs called to get the OperatorAttributes of the operator.Class<? extends StreamOperator>getStreamOperatorClass(ClassLoader classLoader) Returns the runtime class of the stream operator.default booleanIf the stream operator need to be configured with the data type they will operate on.default booleandefault booleanIf the stream operator need access to the output type information atStreamGraphgeneration.default booleanIs this factory forStreamSource.voidsetChainingStrategy(ChainingStrategy strategy) Set the chaining strategy for operator factory.default voidsetInputType(org.apache.flink.api.common.typeinfo.TypeInformation<?> 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.default 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.
-
Method Details
-
createStreamOperator
Create the operator. Sets access to the context and the output. -
setChainingStrategy
Set the chaining strategy for operator factory. -
getChainingStrategy
ChainingStrategy getChainingStrategy()Get the chaining strategy of operator factory. -
isStreamSource
default boolean isStreamSource()Is this factory forStreamSource. -
isLegacySource
default boolean isLegacySource() -
isOutputTypeConfigurable
default boolean isOutputTypeConfigurable()If 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. -
setOutputType
default void setOutputType(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. The method is called with the outputTypeInformationwhich is also used for theStreamTaskoutput serializer.- Parameters:
type- Output type information of theStreamTaskexecutionConfig- Execution configuration
-
isInputTypeConfigurable
default boolean isInputTypeConfigurable()If the stream operator need to be configured with the data type they will operate on. -
setInputType
default void setInputType(org.apache.flink.api.common.typeinfo.TypeInformation<?> 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.- Parameters:
type- The data type of the input.executionConfig- The execution config for this parallel execution.
-
getStreamOperatorClass
Returns the runtime class of the stream operator. -
getOperatorAttributes
Is called to get the OperatorAttributes of the operator. OperatorAttributes can inform the frame to optimize the job performance.- Returns:
- OperatorAttributes of the operator.
-