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 |
outputType
The output logical type.
|
protected int[] |
userDefinedFunctionInputOffsets
The offsets of user-defined function inputs.
|
protected org.apache.flink.table.types.logical.RowType |
userDefinedFunctionInputType
The user-defined function input logical type.
|
protected org.apache.flink.table.types.logical.RowType |
userDefinedFunctionOutputType
The user-defined function output logical type.
|
config, elementCount, jobOptions, maxBundleSize, pythonConfig, pythonFunctionRunner| 构造器和说明 |
|---|
AbstractStatelessFunctionOperator(org.apache.flink.configuration.Configuration config,
org.apache.flink.table.types.logical.RowType inputType,
org.apache.flink.table.types.logical.RowType outputType,
int[] userDefinedFunctionInputOffsets) |
| 限定符和类型 | 方法和说明 |
|---|---|
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 org.apache.flink.table.types.logical.RowType |
createUserDefinedFunctionOutputType() |
abstract UDFIN |
getFunctionInput(IN element) |
abstract String |
getFunctionUrn() |
abstract FlinkFnApi.UserDefinedFunctions |
getUserDefinedFunctionsProto()
Gets the proto representation of the Python user-defined functions to be executed.
|
void |
open() |
void |
processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN> element) |
abstract void |
processElementInternal(IN value) |
endInputcheckInvokeFinishBundleByCount, close, createPythonEnvironmentManager, emitResult, emitResults, finish, getConfiguration, getFlinkMetricContainer, getPythonEnv, 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 final org.apache.flink.table.types.logical.RowType inputType
protected final org.apache.flink.table.types.logical.RowType outputType
protected final int[] userDefinedFunctionInputOffsets
protected transient org.apache.flink.table.types.logical.RowType userDefinedFunctionInputType
protected transient org.apache.flink.table.types.logical.RowType userDefinedFunctionOutputType
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 outputType,
int[] userDefinedFunctionInputOffsets)
public void open()
throws Exception
open 在接口中 org.apache.flink.streaming.api.operators.StreamOperator<OUT>open 在类中 AbstractPythonFunctionOperator<OUT>Exceptionpublic void processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN> element) throws Exception
Exceptionpublic PythonFunctionRunner createPythonFunctionRunner() throws IOException
AbstractPythonFunctionOperatorPythonFunctionRunner which is responsible for Python user-defined
function execution.public abstract void bufferInput(IN input) throws Exception
Exceptionpublic abstract FlinkFnApi.UserDefinedFunctions getUserDefinedFunctionsProto()
public abstract String getFunctionUrn()
public abstract org.apache.flink.table.types.logical.RowType createUserDefinedFunctionOutputType()
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–2022 The Apache Software Foundation. All rights reserved.