Class AbstractEmbeddedStatelessFunctionOperator
- java.lang.Object
-
- org.apache.flink.streaming.api.operators.AbstractStreamOperator<OUT>
-
- org.apache.flink.streaming.api.operators.python.AbstractPythonFunctionOperator<OUT>
-
- org.apache.flink.streaming.api.operators.python.embedded.AbstractEmbeddedPythonFunctionOperator<RowData>
-
- org.apache.flink.table.runtime.operators.python.AbstractEmbeddedStatelessFunctionOperator
-
- All Implemented Interfaces:
Serializable
,CheckpointListener
,BoundedOneInput
,Input<RowData>
,KeyContext
,KeyContextHandler
,OneInputStreamOperator<RowData,RowData>
,StreamOperator<RowData>
,StreamOperatorStateHandler.CheckpointedStreamOperator
,YieldingOperator<RowData>
- Direct Known Subclasses:
EmbeddedPythonScalarFunctionOperator
,EmbeddedPythonTableFunctionOperator
@Internal public abstract class AbstractEmbeddedStatelessFunctionOperator extends AbstractEmbeddedPythonFunctionOperator<RowData> implements OneInputStreamOperator<RowData,RowData>, BoundedOneInput
Base class for all stream operators to execute Python Stateless Functions in embedded Python environment.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected RowType
inputType
The input logical type.protected GenericRowData
reuseResultRowData
The GenericRowData reused holding the execution result of python udf.protected StreamRecordRowDataWrappingCollector
rowDataWrapper
The collector used to collect records.protected int[]
udfInputOffsets
The offsets of user-defined function inputs.protected RowType
udfInputType
The user-defined function input logical type.protected RowType
udfOutputType
The user-defined function output logical type.protected Object[]
userDefinedFunctionInputArgs
protected PythonTypeUtils.DataConverter[]
userDefinedFunctionInputConverters
protected PythonTypeUtils.DataConverter[]
userDefinedFunctionOutputConverters
-
Fields inherited from class org.apache.flink.streaming.api.operators.python.embedded.AbstractEmbeddedPythonFunctionOperator
interpreter
-
Fields inherited from class org.apache.flink.streaming.api.operators.python.AbstractPythonFunctionOperator
bundleFinishedCallback, config, elementCount, lastFinishBundleTime, maxBundleSize, systemEnvEnabled
-
Fields inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperator
lastRecordAttributes1, lastRecordAttributes2, latencyStats, LOG, metrics, output, processingTimeService, stateHandler, stateKeySelector1, stateKeySelector2, timeServiceManager
-
-
Constructor Summary
Constructors Constructor Description AbstractEmbeddedStatelessFunctionOperator(Configuration config, RowType inputType, RowType udfInputType, RowType udfOutputType, int[] udfInputOffsets)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
open()
This method is called immediately before any elements are processed, it should contain the operator's initialization logic, e.g. state initialization.-
Methods inherited from class org.apache.flink.streaming.api.operators.python.embedded.AbstractEmbeddedPythonFunctionOperator
close, createPythonEnvironmentManager, invokeFinishBundle, openPythonInterpreter
-
Methods inherited from class org.apache.flink.streaming.api.operators.python.AbstractPythonFunctionOperator
checkInvokeFinishBundleByCount, finish, getConfiguration, getFlinkMetricContainer, isBundleFinished, prepareSnapshotPreBarrier, processWatermark, setCurrentKey
-
Methods inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperator
getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getStateKeySelector1, getStateKeySelector2, getTimeServiceManager, getUserCodeClassloader, hasKeyContext1, hasKeyContext2, initializeState, initializeState, isUsingCustomRawKeyedState, notifyCheckpointAborted, notifyCheckpointComplete, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processRecordAttributes, processRecordAttributes1, processRecordAttributes2, processWatermark1, processWatermark2, processWatermarkStatus, processWatermarkStatus1, processWatermarkStatus2, reportOrForwardLatencyMarker, setKeyContextElement1, setKeyContextElement2, setMailboxExecutor, setProcessingTimeService, setup, snapshotState, snapshotState, useSplittableTimers
-
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.api.operators.BoundedOneInput
endInput
-
Methods inherited from interface org.apache.flink.api.common.state.CheckpointListener
notifyCheckpointAborted, notifyCheckpointComplete
-
Methods inherited from interface org.apache.flink.streaming.api.operators.Input
processElement, processLatencyMarker, processRecordAttributes, processWatermark, processWatermarkStatus
-
Methods inherited from interface org.apache.flink.streaming.api.operators.KeyContext
getCurrentKey, setCurrentKey
-
Methods inherited from interface org.apache.flink.streaming.api.operators.KeyContextHandler
hasKeyContext
-
Methods inherited from interface org.apache.flink.streaming.api.operators.OneInputStreamOperator
setKeyContextElement
-
Methods inherited from interface org.apache.flink.streaming.api.operators.StreamOperator
close, finish, getMetricGroup, getOperatorAttributes, getOperatorID, initializeState, prepareSnapshotPreBarrier, setKeyContextElement1, setKeyContextElement2, snapshotState
-
-
-
-
Field Detail
-
udfInputOffsets
protected final int[] udfInputOffsets
The offsets of user-defined function inputs.
-
inputType
protected final RowType inputType
The input logical type.
-
udfInputType
protected final RowType udfInputType
The user-defined function input logical type.
-
udfOutputType
protected final RowType udfOutputType
The user-defined function output logical type.
-
reuseResultRowData
protected transient GenericRowData reuseResultRowData
The GenericRowData reused holding the execution result of python udf.
-
rowDataWrapper
protected transient StreamRecordRowDataWrappingCollector rowDataWrapper
The collector used to collect records.
-
userDefinedFunctionInputConverters
protected transient PythonTypeUtils.DataConverter[] userDefinedFunctionInputConverters
-
userDefinedFunctionInputArgs
protected transient Object[] userDefinedFunctionInputArgs
-
userDefinedFunctionOutputConverters
protected transient PythonTypeUtils.DataConverter[] userDefinedFunctionOutputConverters
-
-
Constructor Detail
-
AbstractEmbeddedStatelessFunctionOperator
public AbstractEmbeddedStatelessFunctionOperator(Configuration config, RowType inputType, RowType udfInputType, RowType udfOutputType, int[] udfInputOffsets)
-
-
Method Detail
-
open
public void open() throws Exception
Description copied from class:AbstractStreamOperator
This method is called immediately before any elements are processed, it should contain the operator's initialization logic, e.g. state initialization.The default implementation does nothing.
- Specified by:
open
in interfaceStreamOperator<RowData>
- Overrides:
open
in classAbstractEmbeddedPythonFunctionOperator<RowData>
- Throws:
Exception
- An exception in this method causes the operator to fail.
-
-