@Internal public abstract class AbstractTwoInputPythonFunctionOperator<IN1,IN2,OUT> extends AbstractDataStreamPythonFunctionOperator<OUT> implements org.apache.flink.streaming.api.operators.TwoInputStreamOperator<IN1,IN2,OUT>, org.apache.flink.streaming.api.operators.BoundedMultiInput
AbstractTwoInputPythonFunctionOperator is responsible for launching beam runner which
will start a python harness to execute two-input user defined python function.| 限定符和类型 | 字段和说明 |
|---|---|
protected org.apache.flink.core.memory.ByteArrayOutputStreamWithPos |
baos |
protected org.apache.flink.core.memory.DataOutputViewStreamWrapper |
baosWrapper |
config, elementCount, jobOptions, maxBundleSize, pythonConfig, pythonFunctionRunner| 构造器和说明 |
|---|
AbstractTwoInputPythonFunctionOperator(org.apache.flink.configuration.Configuration config,
DataStreamPythonFunctionInfo pythonFunctionInfo,
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) |
| 限定符和类型 | 方法和说明 |
|---|---|
FlinkFnApi.CoderInfoDescriptor |
createInputCoderInfoDescriptor() |
FlinkFnApi.CoderInfoDescriptor |
createOutputCoderInfoDescriptor() |
void |
emitResult(org.apache.flink.api.java.tuple.Tuple2<byte[],Integer> resultTuple)
Sends the execution result to the downstream operator.
|
void |
endInput(int inputId) |
protected org.apache.flink.api.common.typeinfo.TypeInformation<IN1> |
getLeftInputType() |
protected org.apache.flink.api.common.typeinfo.TypeInformation<IN2> |
getRightInputType() |
void |
open() |
void |
processElement(boolean isLeft,
long timestamp,
long watermark,
Object element) |
containsPartitionCustom, copy, getInternalParameters, getProducedType, getPythonEnv, getPythonFunctionInfo, setContainsPartitionCustom, setNumPartitionscheckInvokeFinishBundleByCount, close, createPythonEnvironmentManager, createPythonFunctionRunner, emitResults, finish, getConfiguration, getFlinkMetricContainer, invokeFinishBundle, isBundleFinished, prepareSnapshotPreBarrier, processWatermark, setConfiguration, setCurrentKeygetChainingStrategy, 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, processWatermarkStatus, processWatermarkStatus1, processWatermarkStatus2, reportOrForwardLatencyMarker, setChainingStrategy, setKeyContextElement1, setKeyContextElement2, setProcessingTimeService, setup, snapshotState, snapshotStateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprocessElement1, processElement2, processLatencyMarker1, processLatencyMarker2, processWatermark1, processWatermark2, processWatermarkStatus1, processWatermarkStatus2close, finish, getMetricGroup, getOperatorID, initializeState, prepareSnapshotPreBarrier, setKeyContextElement1, setKeyContextElement2, snapshotStateprotected transient org.apache.flink.core.memory.ByteArrayOutputStreamWithPos baos
protected transient org.apache.flink.core.memory.DataOutputViewStreamWrapper baosWrapper
public AbstractTwoInputPythonFunctionOperator(org.apache.flink.configuration.Configuration config,
DataStreamPythonFunctionInfo pythonFunctionInfo,
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)
public void open()
throws Exception
open 在接口中 org.apache.flink.streaming.api.operators.StreamOperator<OUT>open 在类中 AbstractPythonFunctionOperator<OUT>Exceptionpublic void endInput(int inputId)
throws Exception
endInput 在接口中 org.apache.flink.streaming.api.operators.BoundedMultiInputExceptionpublic void emitResult(org.apache.flink.api.java.tuple.Tuple2<byte[],Integer> resultTuple) throws Exception
AbstractPythonFunctionOperatoremitResult 在类中 AbstractPythonFunctionOperator<OUT>Exceptionpublic void processElement(boolean isLeft,
long timestamp,
long watermark,
Object element)
throws Exception
Exceptionpublic FlinkFnApi.CoderInfoDescriptor createInputCoderInfoDescriptor()
public FlinkFnApi.CoderInfoDescriptor createOutputCoderInfoDescriptor()
protected org.apache.flink.api.common.typeinfo.TypeInformation<IN1> getLeftInputType()
protected org.apache.flink.api.common.typeinfo.TypeInformation<IN2> getRightInputType()
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.