@Internal public class EmbeddedPythonCoProcessOperator<IN1,IN2,OUT> extends AbstractTwoInputEmbeddedPythonFunctionOperator<IN1,IN2,OUT>
EmbeddedPythonCoProcessOperator
is responsible for executing Python CoProcessFunction in
embedded Python environment.timestamp
collector, hasSideOutput, outputTypeInfo, sideOutputContext
interpreter
bundleFinishedCallback, config, elementCount, lastFinishBundleTime, maxBundleSize, systemEnvEnabled
chainingStrategy, lastRecordAttributes1, lastRecordAttributes2, latencyStats, LOG, metrics, output, processingTimeService, stateHandler, stateKeySelector1, stateKeySelector2, timeServiceManager
Constructor and Description |
---|
EmbeddedPythonCoProcessOperator(Configuration config,
DataStreamPythonFunctionInfo pythonFunctionInfo,
TypeInformation<IN1> inputTypeInfo1,
TypeInformation<IN2> inputTypeInfo2,
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. state initialization.
|
void |
processWatermark(Watermark mark) |
close, endInput, openPythonInterpreter, processElement1, processElement2
addSideOutputTags, getJobParameters, getProducedType, getPythonFunctionInfo, getSideOutputTags, setNumPartitions
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, getStateKeySelector1, getStateKeySelector2, getTimeServiceManager, getUserCodeClassloader, hasKeyContext1, hasKeyContext2, initializeState, initializeState, isUsingCustomRawKeyedState, notifyCheckpointAborted, notifyCheckpointComplete, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processRecordAttributes, processRecordAttributes1, processRecordAttributes2, processWatermark1, processWatermark2, processWatermarkStatus, processWatermarkStatus1, processWatermarkStatus2, reportOrForwardLatencyMarker, setChainingStrategy, setKeyContextElement1, setKeyContextElement2, setMailboxExecutor, setProcessingTimeService, setup, snapshotState, snapshotState, useSplittableTimers
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
processLatencyMarker1, processLatencyMarker2, processRecordAttributes1, processRecordAttributes2, processWatermark1, processWatermark2, processWatermarkStatus1, processWatermarkStatus2
finish, getMetricGroup, getOperatorAttributes, getOperatorID, initializeState, prepareSnapshotPreBarrier, setKeyContextElement1, setKeyContextElement2, snapshotState
notifyCheckpointAborted, notifyCheckpointComplete
getCurrentKey, setCurrentKey
hasKeyContext
public EmbeddedPythonCoProcessOperator(Configuration config, DataStreamPythonFunctionInfo pythonFunctionInfo, TypeInformation<IN1> inputTypeInfo1, TypeInformation<IN2> inputTypeInfo2, TypeInformation<OUT> outputTypeInfo)
public void open() throws Exception
AbstractStreamOperator
The default implementation does nothing.
open
in interface StreamOperator<OUT>
open
in class AbstractTwoInputEmbeddedPythonFunctionOperator<IN1,IN2,OUT>
Exception
- An exception in this method causes the operator to fail.public List<FlinkFnApi.UserDefinedDataStreamFunction> createUserDefinedFunctionsProto()
AbstractTwoInputEmbeddedPythonFunctionOperator
createUserDefinedFunctionsProto
in class AbstractTwoInputEmbeddedPythonFunctionOperator<IN1,IN2,OUT>
public Object getFunctionContext()
AbstractTwoInputEmbeddedPythonFunctionOperator
getFunctionContext
in class AbstractTwoInputEmbeddedPythonFunctionOperator<IN1,IN2,OUT>
public Object getTimerContext()
AbstractTwoInputEmbeddedPythonFunctionOperator
getTimerContext
in class AbstractTwoInputEmbeddedPythonFunctionOperator<IN1,IN2,OUT>
public <T> AbstractEmbeddedDataStreamPythonFunctionOperator<T> copy(DataStreamPythonFunctionInfo pythonFunctionInfo, TypeInformation<T> outputTypeInfo)
DataStreamPythonFunctionOperator
public void processWatermark(Watermark mark) throws Exception
processWatermark
in class AbstractPythonFunctionOperator<OUT>
Exception
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.