@Internal public abstract class TwoInputPythonFunctionOperator<IN1,IN2,RUNNER_OUT,OUT> extends AbstractTwoInputPythonFunctionOperator<IN1,IN2,OUT>
TwoInputPythonFunctionOperator
is responsible for launching beam runner which will start
a python harness to execute two-input user defined python function.Modifier and Type | Field and Description |
---|---|
protected org.apache.flink.core.memory.ByteArrayInputStreamWithPos |
bais |
protected org.apache.flink.core.memory.DataInputViewStreamWrapper |
baisWrapper |
protected org.apache.flink.core.memory.ByteArrayOutputStreamWithPos |
baos |
protected org.apache.flink.core.memory.DataOutputViewStreamWrapper |
baosWrapper |
protected org.apache.flink.streaming.api.operators.TimestampedCollector |
collector |
protected org.apache.flink.types.Row |
reuseRow |
elementCount, maxBundleSize, pythonFunctionRunner
Constructor and Description |
---|
TwoInputPythonFunctionOperator(org.apache.flink.configuration.Configuration config,
DataStreamPythonFunctionInfo pythonFunctionInfo,
String coderUrn,
org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> runnerInputTypeInfo,
org.apache.flink.api.common.typeinfo.TypeInformation<RUNNER_OUT> runnerOutputTypeInfo) |
TwoInputPythonFunctionOperator(org.apache.flink.configuration.Configuration config,
org.apache.flink.api.common.typeinfo.TypeInformation<IN1> inputTypeInfo1,
org.apache.flink.api.common.typeinfo.TypeInformation<IN2> inputTypeInfo2,
org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outputTypeInfo,
DataStreamPythonFunctionInfo pythonFunctionInfo,
String coderUrn) |
Modifier and Type | Method and Description |
---|---|
PythonFunctionRunner |
createPythonFunctionRunner()
Creates the
PythonFunctionRunner which is responsible for Python user-defined
function execution. |
protected String |
getCoderUrn() |
protected Map<String,String> |
getJobOptions() |
org.apache.flink.table.functions.python.PythonEnv |
getPythonEnv()
Returns the
PythonEnv used to create PythonEnvironmentManager.. |
protected DataStreamPythonFunctionInfo |
getPythonFunctionInfo() |
protected org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> |
getRunnerInputTypeInfo() |
protected org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.types.Row> |
getRunnerInputTypeSerializer() |
protected org.apache.flink.api.common.typeinfo.TypeInformation<RUNNER_OUT> |
getRunnerOutputTypeInfo() |
protected org.apache.flink.api.common.typeutils.TypeSerializer<RUNNER_OUT> |
getRunnerOutputTypeSerializer() |
void |
open() |
void |
processElement1(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN1> element) |
void |
processElement2(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN2> element) |
endInput
checkInvokeFinishBundleByCount, close, createPythonEnvironmentManager, dispose, emitResult, emitResults, getConfig, getFlinkMetricContainer, getPythonConfig, invokeFinishBundle, isBundleFinished, prepareSnapshotPreBarrier, processWatermark, setCurrentKey, setPythonConfig
getChainingStrategy, getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getTimeServiceManager, getUserCodeClassloader, initializeState, initializeState, isUsingCustomRawKeyedState, notifyCheckpointAborted, notifyCheckpointComplete, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processWatermark1, processWatermark2, reportOrForwardLatencyMarker, setChainingStrategy, setKeyContextElement1, setKeyContextElement2, setProcessingTimeService, setup, snapshotState, snapshotState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
processLatencyMarker1, processLatencyMarker2, processWatermark1, processWatermark2
close, dispose, getMetricGroup, getOperatorID, initializeState, prepareSnapshotPreBarrier, setKeyContextElement1, setKeyContextElement2, snapshotState
protected transient org.apache.flink.core.memory.ByteArrayInputStreamWithPos bais
protected transient org.apache.flink.core.memory.DataInputViewStreamWrapper baisWrapper
protected transient org.apache.flink.core.memory.ByteArrayOutputStreamWithPos baos
protected transient org.apache.flink.core.memory.DataOutputViewStreamWrapper baosWrapper
protected transient org.apache.flink.streaming.api.operators.TimestampedCollector collector
protected transient org.apache.flink.types.Row reuseRow
public TwoInputPythonFunctionOperator(org.apache.flink.configuration.Configuration config, DataStreamPythonFunctionInfo pythonFunctionInfo, String coderUrn, org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> runnerInputTypeInfo, org.apache.flink.api.common.typeinfo.TypeInformation<RUNNER_OUT> runnerOutputTypeInfo)
public TwoInputPythonFunctionOperator(org.apache.flink.configuration.Configuration config, org.apache.flink.api.common.typeinfo.TypeInformation<IN1> inputTypeInfo1, org.apache.flink.api.common.typeinfo.TypeInformation<IN2> inputTypeInfo2, org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outputTypeInfo, DataStreamPythonFunctionInfo pythonFunctionInfo, String coderUrn)
public void open() throws Exception
open
in interface org.apache.flink.streaming.api.operators.StreamOperator<OUT>
open
in class AbstractPythonFunctionOperator<OUT>
Exception
public PythonFunctionRunner createPythonFunctionRunner() throws Exception
AbstractPythonFunctionOperator
PythonFunctionRunner
which is responsible for Python user-defined
function execution.createPythonFunctionRunner
in class AbstractPythonFunctionOperator<OUT>
Exception
public org.apache.flink.table.functions.python.PythonEnv getPythonEnv()
AbstractPythonFunctionOperator
PythonEnv
used to create PythonEnvironmentManager..getPythonEnv
in class AbstractPythonFunctionOperator<OUT>
public void processElement1(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN1> element) throws Exception
Exception
public void processElement2(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN2> element) throws Exception
Exception
protected String getCoderUrn()
protected org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> getRunnerInputTypeInfo()
protected org.apache.flink.api.common.typeinfo.TypeInformation<RUNNER_OUT> getRunnerOutputTypeInfo()
protected DataStreamPythonFunctionInfo getPythonFunctionInfo()
protected org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.types.Row> getRunnerInputTypeSerializer()
protected org.apache.flink.api.common.typeutils.TypeSerializer<RUNNER_OUT> getRunnerOutputTypeSerializer()
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.