@Internal public class PythonScalarFunctionOperator extends AbstractPythonScalarFunctionOperator<org.apache.flink.table.runtime.types.CRow,org.apache.flink.table.runtime.types.CRow,Row,Row>
ScalarFunction
operator for the legacy planner.AbstractStreamOperator.CountingOutput<OUT>
forwardedFields, forwardedInputQueue, inputType, outputType, scalarFunctions, udfInputOffsets, udfInputType, udfOutputType, udfResultQueue
chainingStrategy, latencyStats, LOG, metrics, output, timeServiceManager
Constructor and Description |
---|
PythonScalarFunctionOperator(Configuration config,
PythonFunctionInfo[] scalarFunctions,
RowType inputType,
RowType outputType,
int[] udfInputOffsets,
int[] forwardedFields) |
Modifier and Type | Method and Description |
---|---|
void |
bufferInput(org.apache.flink.table.runtime.types.CRow input)
Buffers the specified input, it will be used to construct
the operator result together with the udf execution result.
|
PythonFunctionRunner<Row> |
createPythonFunctionRunner(org.apache.beam.sdk.fn.data.FnDataReceiver<Row> resultReceiver,
PythonEnvironmentManager pythonEnvironmentManager) |
void |
emitResults()
Sends the execution results to the downstream operator.
|
Row |
getUdfInput(org.apache.flink.table.runtime.types.CRow element) |
void |
open()
This method is called immediately before any elements are processed, it should contain the
operator's initialization logic, e.g.
|
createPythonFunctionRunner, getPythonEnv, processElement
close, createPythonEnvironmentManager, dispose, endInput, prepareSnapshotPreBarrier, processWatermark
getChainingStrategy, getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getUserCodeClassloader, initializeState, initializeState, notifyCheckpointComplete, numEventTimeTimers, numProcessingTimeTimers, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processWatermark1, processWatermark2, reportOrForwardLatencyMarker, setChainingStrategy, setCurrentKey, setKeyContextElement1, setKeyContextElement2, setup, snapshotState, snapshotState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
processLatencyMarker
getChainingStrategy, getMetricGroup, getOperatorID, initializeState, setChainingStrategy, setKeyContextElement1, setKeyContextElement2, snapshotState
notifyCheckpointComplete
getCurrentKey, setCurrentKey
public PythonScalarFunctionOperator(Configuration config, PythonFunctionInfo[] scalarFunctions, RowType inputType, RowType outputType, int[] udfInputOffsets, int[] forwardedFields)
public void open() throws Exception
AbstractStreamOperator
The default implementation does nothing.
open
in interface StreamOperator<org.apache.flink.table.runtime.types.CRow>
open
in class AbstractPythonScalarFunctionOperator<org.apache.flink.table.runtime.types.CRow,org.apache.flink.table.runtime.types.CRow,Row,Row>
Exception
- An exception in this method causes the operator to fail.public void bufferInput(org.apache.flink.table.runtime.types.CRow input)
AbstractPythonScalarFunctionOperator
bufferInput
in class AbstractPythonScalarFunctionOperator<org.apache.flink.table.runtime.types.CRow,org.apache.flink.table.runtime.types.CRow,Row,Row>
public Row getUdfInput(org.apache.flink.table.runtime.types.CRow element)
getUdfInput
in class AbstractPythonScalarFunctionOperator<org.apache.flink.table.runtime.types.CRow,org.apache.flink.table.runtime.types.CRow,Row,Row>
public void emitResults()
AbstractPythonFunctionOperator
emitResults
in class AbstractPythonFunctionOperator<org.apache.flink.table.runtime.types.CRow,org.apache.flink.table.runtime.types.CRow>
public PythonFunctionRunner<Row> createPythonFunctionRunner(org.apache.beam.sdk.fn.data.FnDataReceiver<Row> resultReceiver, PythonEnvironmentManager pythonEnvironmentManager)
createPythonFunctionRunner
in class AbstractPythonScalarFunctionOperator<org.apache.flink.table.runtime.types.CRow,org.apache.flink.table.runtime.types.CRow,Row,Row>
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.