@Internal public abstract class AbstractOneInputPythonFunctionOperator<IN,OUT> extends AbstractDataStreamPythonFunctionOperator<OUT> implements org.apache.flink.streaming.api.operators.OneInputStreamOperator<IN,OUT>, org.apache.flink.streaming.api.operators.BoundedOneInput
AbstractOneInputPythonFunctionOperator is responsible for launching beam runner which
will start a python harness to execute user defined python function.
The operator will buffer the timestamp of input elements in a queue, and set into the produced output element.
| 限定符和类型 | 字段和说明 |
|---|---|
protected org.apache.flink.core.memory.ByteArrayOutputStreamWithPos |
baos
Reusable OutputStream used to holding the serialized input elements.
|
protected org.apache.flink.core.memory.DataOutputViewStreamWrapper |
baosWrapper
OutputStream Wrapper.
|
config, elementCount, jobOptions, maxBundleSize, pythonConfig, pythonFunctionRunner| 构造器和说明 |
|---|
AbstractOneInputPythonFunctionOperator(org.apache.flink.configuration.Configuration config,
DataStreamPythonFunctionInfo pythonFunctionInfo,
org.apache.flink.api.common.typeinfo.TypeInformation<IN> inputTypeInfo,
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() |
org.apache.flink.api.common.typeinfo.TypeInformation<IN> |
getInputTypeInfo() |
void |
open() |
void |
processElement(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, waitclose, 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 AbstractOneInputPythonFunctionOperator(org.apache.flink.configuration.Configuration config,
DataStreamPythonFunctionInfo pythonFunctionInfo,
org.apache.flink.api.common.typeinfo.TypeInformation<IN> inputTypeInfo,
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()
throws Exception
endInput 在接口中 org.apache.flink.streaming.api.operators.BoundedOneInputExceptionpublic void emitResult(org.apache.flink.api.java.tuple.Tuple2<byte[],Integer> resultTuple) throws Exception
AbstractPythonFunctionOperatoremitResult 在类中 AbstractPythonFunctionOperator<OUT>Exceptionpublic void processElement(long timestamp,
long watermark,
Object element)
throws Exception
Exceptionpublic FlinkFnApi.CoderInfoDescriptor createInputCoderInfoDescriptor()
public FlinkFnApi.CoderInfoDescriptor createOutputCoderInfoDescriptor()
public org.apache.flink.api.common.typeinfo.TypeInformation<IN> getInputTypeInfo()
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.