@Internal public class EmbeddedPythonProcessOperator<IN,OUT> extends AbstractOneInputEmbeddedPythonFunctionOperator<IN,OUT>
EmbeddedPythonProcessOperator
is responsible for executing Python ProcessFunction in
embedded Python environment.timestamp
collector, hasSideOutput, outputTypeInfo, sideOutputContext
interpreter
bundleFinishedCallback, config, elementCount, lastFinishBundleTime, maxBundleSize, systemEnvEnabled
chainingStrategy, latencyStats, LOG, metrics, output, processingTimeService
Constructor and Description |
---|
EmbeddedPythonProcessOperator(Configuration config,
DataStreamPythonFunctionInfo pythonFunctionInfo,
TypeInformation<IN> inputTypeInfo,
TypeInformation<OUT> outputTypeInfo) |
Modifier and Type | Method and Description |
---|---|
<T> AbstractEmbeddedDataStreamPythonFunctionOperator<T> |
copy(DataStreamPythonFunctionInfo pythonFunctionInfo,
TypeInformation<T> outputTypeInfo)
Make a copy of the DataStreamPythonFunctionOperator with the given pythonFunctionInfo and
outputTypeInfo.
|
List<FlinkFnApi.UserDefinedDataStreamFunction> |
createUserDefinedFunctionsProto()
Gets the proto representation of the Python user-defined functions to be executed.
|
Object |
getFunctionContext()
Gets The function context.
|
Object |
getTimerContext()
Gets The Timer context.
|
void |
open()
This method is called immediately before any elements are processed, it should contain the
operator's initialization logic, e.g.
|
void |
processWatermark(Watermark mark)
Processes a
Watermark that arrived on the first input of this two-input operator. |
endInput, openPythonInterpreter, processElement
addSideOutputTags, getJobParameters, getProducedType, getPythonFunctionInfo, getSideOutputTags, setNumPartitions
close, createPythonEnvironmentManager, invokeFinishBundle
checkInvokeFinishBundleByCount, finish, getConfiguration, getFlinkMetricContainer, isBundleFinished, prepareSnapshotPreBarrier, setCurrentKey
getChainingStrategy, getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getTimeServiceManager, getUserCodeClassloader, hasKeyContext1, hasKeyContext2, initializeState, initializeState, isUsingCustomRawKeyedState, notifyCheckpointAborted, notifyCheckpointComplete, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processWatermark1, processWatermark2, processWatermarkStatus, processWatermarkStatus1, processWatermarkStatus2, reportOrForwardLatencyMarker, setChainingStrategy, setKeyContextElement1, setKeyContextElement2, setProcessingTimeService, setup, snapshotState, snapshotState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setKeyContextElement
close, finish, getMetricGroup, getOperatorID, initializeState, prepareSnapshotPreBarrier, setKeyContextElement1, setKeyContextElement2, snapshotState
notifyCheckpointAborted, notifyCheckpointComplete
getCurrentKey, setCurrentKey
processLatencyMarker, processWatermarkStatus
hasKeyContext
public EmbeddedPythonProcessOperator(Configuration config, DataStreamPythonFunctionInfo pythonFunctionInfo, TypeInformation<IN> inputTypeInfo, TypeInformation<OUT> outputTypeInfo)
public void open() throws Exception
AbstractStreamOperator
The default implementation does nothing.
open
in interface StreamOperator<OUT>
open
in class AbstractOneInputEmbeddedPythonFunctionOperator<IN,OUT>
Exception
- An exception in this method causes the operator to fail.public List<FlinkFnApi.UserDefinedDataStreamFunction> createUserDefinedFunctionsProto()
AbstractOneInputEmbeddedPythonFunctionOperator
createUserDefinedFunctionsProto
in class AbstractOneInputEmbeddedPythonFunctionOperator<IN,OUT>
public Object getFunctionContext()
AbstractOneInputEmbeddedPythonFunctionOperator
getFunctionContext
in class AbstractOneInputEmbeddedPythonFunctionOperator<IN,OUT>
public Object getTimerContext()
AbstractOneInputEmbeddedPythonFunctionOperator
getTimerContext
in class AbstractOneInputEmbeddedPythonFunctionOperator<IN,OUT>
public <T> AbstractEmbeddedDataStreamPythonFunctionOperator<T> copy(DataStreamPythonFunctionInfo pythonFunctionInfo, TypeInformation<T> outputTypeInfo)
DataStreamPythonFunctionOperator
public void processWatermark(Watermark mark) throws Exception
Input
Watermark
that arrived on the first input of this two-input operator.
This method is guaranteed to not be called concurrently with other methods of the operator.processWatermark
in interface Input<IN>
processWatermark
in class AbstractPythonFunctionOperator<OUT>
Exception
Watermark
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.