@Internal public class PythonTableFunctionOperator extends AbstractStatelessFunctionOperator<RowData,RowData,RowData>
TableFunction
operator.bais, baisWrapper, baos, baosWrapper, forwardedInputQueue, inputType, udfInputType, udfOutputType
pythonFunctionRunner
bundleFinishedCallback, config, elementCount, lastFinishBundleTime, maxBundleSize, systemEnvEnabled
chainingStrategy, latencyStats, LOG, metrics, output, processingTimeService
Constructor and Description |
---|
PythonTableFunctionOperator(Configuration config,
PythonFunctionInfo tableFunction,
RowType inputType,
RowType udfInputType,
RowType udfOutputType,
FlinkJoinType joinType,
GeneratedProjection udtfInputGeneratedProjection) |
Modifier and Type | Method and Description |
---|---|
void |
bufferInput(RowData input)
Buffers the specified input, it will be used to construct the operator result together with
the user-defined function execution result.
|
FlinkFnApi.CoderInfoDescriptor |
createInputCoderInfoDescriptor(RowType runnerInputType) |
FlinkFnApi.CoderInfoDescriptor |
createOutputCoderInfoDescriptor(RowType runnerOutType) |
FlinkFnApi.UserDefinedFunctions |
createUserDefinedFunctionsProto()
Gets the proto representation of the Python user-defined functions to be executed.
|
void |
emitResult(Tuple3<String,byte[],Integer> resultTuple)
Sends the execution result to the downstream operator.
|
RowData |
getFunctionInput(RowData element) |
String |
getFunctionUrn() |
PythonEnv |
getPythonEnv()
Returns the
PythonEnv used to create PythonEnvironmentManager.. |
void |
open()
This method is called immediately before any elements are processed, it should contain the
operator's initialization logic, e.g.
|
void |
processElementInternal(RowData value) |
createPythonFunctionRunner, processElement
endInput
close, createPythonEnvironmentManager, emitResults, invokeFinishBundle
checkInvokeFinishBundleByCount, finish, getConfiguration, getFlinkMetricContainer, isBundleFinished, prepareSnapshotPreBarrier, processWatermark, setCurrentKey
getChainingStrategy, 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, registerCounterOnOutput, reportOrForwardLatencyMarker, setChainingStrategy, setKeyContextElement1, setKeyContextElement2, setProcessingTimeService, setup, snapshotState, snapshotState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setKeyContextElement
close, finish, getMetricGroup, getOperatorID, initializeState, prepareSnapshotPreBarrier, setKeyContextElement1, setKeyContextElement2, snapshotState
notifyCheckpointAborted, notifyCheckpointComplete
getCurrentKey, setCurrentKey
processLatencyMarker, processWatermark, processWatermarkStatus
public PythonTableFunctionOperator(Configuration config, PythonFunctionInfo tableFunction, RowType inputType, RowType udfInputType, RowType udfOutputType, FlinkJoinType joinType, GeneratedProjection udtfInputGeneratedProjection)
public void open() throws Exception
AbstractStreamOperator
The default implementation does nothing.
open
in interface StreamOperator<RowData>
open
in class AbstractStatelessFunctionOperator<RowData,RowData,RowData>
Exception
- An exception in this method causes the operator to fail.public PythonEnv getPythonEnv()
AbstractExternalPythonFunctionOperator
PythonEnv
used to create PythonEnvironmentManager..getPythonEnv
in class AbstractExternalPythonFunctionOperator<RowData>
public String getFunctionUrn()
getFunctionUrn
in class AbstractStatelessFunctionOperator<RowData,RowData,RowData>
public FlinkFnApi.CoderInfoDescriptor createInputCoderInfoDescriptor(RowType runnerInputType)
createInputCoderInfoDescriptor
in class AbstractStatelessFunctionOperator<RowData,RowData,RowData>
public FlinkFnApi.CoderInfoDescriptor createOutputCoderInfoDescriptor(RowType runnerOutType)
createOutputCoderInfoDescriptor
in class AbstractStatelessFunctionOperator<RowData,RowData,RowData>
public FlinkFnApi.UserDefinedFunctions createUserDefinedFunctionsProto()
AbstractStatelessFunctionOperator
createUserDefinedFunctionsProto
in class AbstractStatelessFunctionOperator<RowData,RowData,RowData>
public void bufferInput(RowData input)
AbstractStatelessFunctionOperator
bufferInput
in class AbstractStatelessFunctionOperator<RowData,RowData,RowData>
public RowData getFunctionInput(RowData element)
getFunctionInput
in class AbstractStatelessFunctionOperator<RowData,RowData,RowData>
public void processElementInternal(RowData value) throws Exception
processElementInternal
in class AbstractStatelessFunctionOperator<RowData,RowData,RowData>
Exception
public void emitResult(Tuple3<String,byte[],Integer> resultTuple) throws Exception
AbstractExternalPythonFunctionOperator
emitResult
in class AbstractExternalPythonFunctionOperator<RowData>
Exception
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.