IN - Type of the input elements.OUT - Type of the output elements.UDFIN - Type of the UDF input type.@Internal public abstract class AbstractStatelessFunctionOperator<IN,OUT,UDFIN> extends AbstractOneInputPythonFunctionOperator<IN,OUT>
| 限定符和类型 | 字段和说明 |
|---|---|
protected org.apache.flink.core.memory.ByteArrayInputStreamWithPos |
bais
Reusable InputStream used to holding the execution results to be deserialized.
|
protected org.apache.flink.core.memory.DataInputViewStreamWrapper |
baisWrapper
InputStream Wrapper.
|
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.
|
protected LinkedList<IN> |
forwardedInputQueue
The queue holding the input elements for which the execution results have not been received.
|
protected org.apache.flink.table.types.logical.RowType |
inputType
The input logical type.
|
protected org.apache.flink.table.types.logical.RowType |
udfInputType
The user-defined function input logical type.
|
protected org.apache.flink.table.types.logical.RowType |
udfOutputType
The user-defined function output logical type.
|
pythonFunctionRunnerbundleFinishedCallback, config, elementCount, lastFinishBundleTime, maxBundleSize, systemEnvEnabled| 构造器和说明 |
|---|
AbstractStatelessFunctionOperator(org.apache.flink.configuration.Configuration config,
org.apache.flink.table.types.logical.RowType inputType,
org.apache.flink.table.types.logical.RowType udfInputType,
org.apache.flink.table.types.logical.RowType udfOutputType) |
| 限定符和类型 | 方法和说明 |
|---|---|
abstract void |
bufferInput(IN input)
Buffers the specified input, it will be used to construct the operator result together with
the user-defined function execution result.
|
abstract FlinkFnApi.CoderInfoDescriptor |
createInputCoderInfoDescriptor(org.apache.flink.table.types.logical.RowType runnerInputType) |
abstract FlinkFnApi.CoderInfoDescriptor |
createOutputCoderInfoDescriptor(org.apache.flink.table.types.logical.RowType runnerOutType) |
PythonFunctionRunner |
createPythonFunctionRunner()
Creates the
PythonFunctionRunner which is responsible for Python user-defined
function execution. |
abstract FlinkFnApi.UserDefinedFunctions |
createUserDefinedFunctionsProto()
Gets the proto representation of the Python user-defined functions to be executed.
|
abstract UDFIN |
getFunctionInput(IN element) |
abstract String |
getFunctionUrn() |
void |
open() |
void |
processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN> element) |
abstract void |
processElementInternal(IN value) |
endInputclose, createPythonEnvironmentManager, emitResult, emitResults, getPythonEnv, 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, notifyCheckpointCompleteprotected final org.apache.flink.table.types.logical.RowType inputType
protected final org.apache.flink.table.types.logical.RowType udfInputType
protected final org.apache.flink.table.types.logical.RowType udfOutputType
protected transient LinkedList<IN> forwardedInputQueue
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
public AbstractStatelessFunctionOperator(org.apache.flink.configuration.Configuration config,
org.apache.flink.table.types.logical.RowType inputType,
org.apache.flink.table.types.logical.RowType udfInputType,
org.apache.flink.table.types.logical.RowType udfOutputType)
public void open()
throws Exception
open 在接口中 org.apache.flink.streaming.api.operators.StreamOperator<OUT>open 在类中 AbstractExternalPythonFunctionOperator<OUT>Exceptionpublic void processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN> element) throws Exception
Exceptionpublic PythonFunctionRunner createPythonFunctionRunner() throws IOException
PythonFunctionRunner which is responsible for Python user-defined
function execution.public abstract void bufferInput(IN input) throws Exception
Exceptionpublic abstract FlinkFnApi.UserDefinedFunctions createUserDefinedFunctionsProto()
public abstract String getFunctionUrn()
public abstract FlinkFnApi.CoderInfoDescriptor createInputCoderInfoDescriptor(org.apache.flink.table.types.logical.RowType runnerInputType)
public abstract FlinkFnApi.CoderInfoDescriptor createOutputCoderInfoDescriptor(org.apache.flink.table.types.logical.RowType runnerOutType)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.