@Internal public class PythonTableFunctionOperator extends AbstractStatelessFunctionOperator<RowData,RowData,RowData>
TableFunction
operator.Modifier and Type | Field and Description |
---|---|
protected FlinkJoinType |
joinType
The correlate join type.
|
bais, baisWrapper, baos, baosWrapper, forwardedInputQueue, inputType, outputType, userDefinedFunctionInputOffsets, userDefinedFunctionInputType, userDefinedFunctionOutputType
config, elementCount, jobOptions, maxBundleSize, pythonConfig, pythonFunctionRunner
chainingStrategy, latencyStats, LOG, metrics, output, processingTimeService
Constructor and Description |
---|
PythonTableFunctionOperator(Configuration config,
PythonFunctionInfo tableFunction,
RowType inputType,
RowType outputType,
int[] udtfInputOffsets,
FlinkJoinType joinType) |
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) |
RowType |
createUserDefinedFunctionOutputType() |
void |
emitResult(Tuple2<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.. |
FlinkFnApi.UserDefinedFunctions |
getUserDefinedFunctionsProto()
Gets the proto representation of the Python user-defined functions to be executed.
|
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
checkInvokeFinishBundleByCount, close, createPythonEnvironmentManager, emitResults, finish, getConfiguration, getFlinkMetricContainer, invokeFinishBundle, isBundleFinished, prepareSnapshotPreBarrier, processWatermark, setConfiguration, 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, 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
protected final FlinkJoinType joinType
public PythonTableFunctionOperator(Configuration config, PythonFunctionInfo tableFunction, RowType inputType, RowType outputType, int[] udtfInputOffsets, FlinkJoinType joinType)
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()
AbstractPythonFunctionOperator
PythonEnv
used to create PythonEnvironmentManager..getPythonEnv
in class AbstractPythonFunctionOperator<RowData>
public String getFunctionUrn()
getFunctionUrn
in class AbstractStatelessFunctionOperator<RowData,RowData,RowData>
public RowType createUserDefinedFunctionOutputType()
createUserDefinedFunctionOutputType
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 getUserDefinedFunctionsProto()
AbstractStatelessFunctionOperator
getUserDefinedFunctionsProto
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(Tuple2<byte[],Integer> resultTuple) throws Exception
AbstractPythonFunctionOperator
emitResult
in class AbstractPythonFunctionOperator<RowData>
Exception
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.