OUT - The output type of the operator@Internal public class SimpleOperatorFactory<OUT> extends Object implements StreamOperatorFactory<OUT>
StreamOperator.| Modifier | Constructor and Description |
|---|---|
protected |
SimpleOperatorFactory(StreamOperator<OUT> operator) |
| Modifier and Type | Method and Description |
|---|---|
<T extends StreamOperator<OUT>> |
createStreamOperator(StreamTask<?,?> containingTask,
StreamConfig config,
Output<StreamRecord<OUT>> output)
Create the operator.
|
ChainingStrategy |
getChainingStrategy()
Get the chaining strategy of operator factory.
|
StreamOperator<OUT> |
getOperator() |
Class<? extends StreamOperator> |
getStreamOperatorClass(ClassLoader classLoader)
Returns the runtime class of the stream operator.
|
boolean |
isInputTypeConfigurable()
If the stream operator need to be configured with the data type they will operate on.
|
boolean |
isOutputTypeConfigurable()
If the stream operator need access to the output type information at
StreamGraph
generation. |
boolean |
isStreamSource()
Is this factory for
StreamSource. |
static <OUT> SimpleOperatorFactory<OUT> |
of(StreamOperator<OUT> operator)
Create a SimpleOperatorFactory from existed StreamOperator.
|
void |
setChainingStrategy(ChainingStrategy strategy)
Set the chaining strategy for operator factory.
|
void |
setInputType(org.apache.flink.api.common.typeinfo.TypeInformation<?> type,
org.apache.flink.api.common.ExecutionConfig executionConfig)
Is called by the
StreamGraph.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 the StreamGraph is
generated. |
void |
setOutputType(org.apache.flink.api.common.typeinfo.TypeInformation<OUT> type,
org.apache.flink.api.common.ExecutionConfig executionConfig)
Is called by the
StreamGraph.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 the StreamGraph is
generated. |
protected SimpleOperatorFactory(StreamOperator<OUT> operator)
public static <OUT> SimpleOperatorFactory<OUT> of(StreamOperator<OUT> operator)
public StreamOperator<OUT> getOperator()
public <T extends StreamOperator<OUT>> T createStreamOperator(StreamTask<?,?> containingTask, StreamConfig config, Output<StreamRecord<OUT>> output)
StreamOperatorFactorycreateStreamOperator in interface StreamOperatorFactory<OUT>public void setChainingStrategy(ChainingStrategy strategy)
StreamOperatorFactorysetChainingStrategy in interface StreamOperatorFactory<OUT>public ChainingStrategy getChainingStrategy()
StreamOperatorFactorygetChainingStrategy in interface StreamOperatorFactory<OUT>public boolean isStreamSource()
StreamOperatorFactoryStreamSource.isStreamSource in interface StreamOperatorFactory<OUT>public boolean isOutputTypeConfigurable()
StreamOperatorFactoryStreamGraph
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.isOutputTypeConfigurable in interface StreamOperatorFactory<OUT>public void setOutputType(org.apache.flink.api.common.typeinfo.TypeInformation<OUT> type, org.apache.flink.api.common.ExecutionConfig executionConfig)
StreamOperatorFactoryStreamGraph.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 the StreamGraph is
generated. The method is called with the output TypeInformation which is also used
for the StreamTask output serializer.setOutputType in interface StreamOperatorFactory<OUT>type - Output type information of the StreamTaskexecutionConfig - Execution configurationpublic boolean isInputTypeConfigurable()
StreamOperatorFactoryisInputTypeConfigurable in interface StreamOperatorFactory<OUT>public void setInputType(org.apache.flink.api.common.typeinfo.TypeInformation<?> type,
org.apache.flink.api.common.ExecutionConfig executionConfig)
StreamOperatorFactoryStreamGraph.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 the StreamGraph is
generated.setInputType in interface StreamOperatorFactory<OUT>type - The data type of the input.executionConfig - The execution config for this parallel execution.public Class<? extends StreamOperator> getStreamOperatorClass(ClassLoader classLoader)
StreamOperatorFactorygetStreamOperatorClass in interface StreamOperatorFactory<OUT>Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.