@Internal public abstract class AbstractExternalOneInputPythonFunctionOperator<IN,OUT> extends AbstractExternalDataStreamPythonFunctionOperator<OUT> implements org.apache.flink.streaming.api.operators.OneInputStreamOperator<IN,OUT>, org.apache.flink.streaming.api.operators.BoundedOneInput
AbstractExternalOneInputPythonFunctionOperator 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.
|
pythonFunctionRunnerbundleFinishedCallback, config, elementCount, lastFinishBundleTime, maxBundleSize, systemEnvEnabled| 构造器和说明 |
|---|
AbstractExternalOneInputPythonFunctionOperator(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.Tuple3<String,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) |
addSideOutputTags, createSideOutputCoderDescriptors, getInternalParameters, getOutputTagById, getProducedType, getPythonEnv, getPythonFunctionInfo, getSideOutputTags, getSideOutputTypeSerializerById, setNumPartitionsclose, createPythonEnvironmentManager, createPythonFunctionRunner, emitResults, invokeFinishBundlecheckInvokeFinishBundleByCount, finish, getConfiguration, getFlinkMetricContainer, isBundleFinished, prepareSnapshotPreBarrier, processWatermark, setCurrentKeygetChainingStrategy, 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, useSplittableTimersclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, finish, getMetricGroup, getOperatorAttributes, getOperatorID, initializeState, prepareSnapshotPreBarrier, setKeyContextElement1, setKeyContextElement2, snapshotStatenotifyCheckpointAborted, notifyCheckpointCompleteprocessElement, processLatencyMarker, processRecordAttributes, processWatermark, processWatermarkStatuscopyprotected transient org.apache.flink.core.memory.ByteArrayOutputStreamWithPos baos
protected transient org.apache.flink.core.memory.DataOutputViewStreamWrapper baosWrapper
public AbstractExternalOneInputPythonFunctionOperator(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 在类中 AbstractExternalDataStreamPythonFunctionOperator<OUT>Exceptionpublic void endInput()
throws Exception
endInput 在接口中 org.apache.flink.streaming.api.operators.BoundedOneInputExceptionpublic void emitResult(org.apache.flink.api.java.tuple.Tuple3<String,byte[],Integer> resultTuple) throws Exception
emitResult 在类中 AbstractExternalPythonFunctionOperator<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–2024 The Apache Software Foundation. All rights reserved.