IN
- Type of the input elements.@Internal public abstract class AbstractPythonTableFunctionRunner<IN> extends AbstractPythonStatelessFunctionRunner<IN>
PythonFunctionRunner
used to execute Python TableFunction
.baos, baosWrapper, flinkMetricContainer, mainInputReceiver, resultReceiver
Constructor and Description |
---|
AbstractPythonTableFunctionRunner(String taskName,
org.apache.beam.sdk.fn.data.FnDataReceiver<byte[]> resultReceiver,
PythonFunctionInfo tableFunction,
PythonEnvironmentManager environmentManager,
RowType inputType,
RowType outputType,
Map<String,String> jobOptions,
FlinkMetricContainer flinkMetricContainer) |
Modifier and Type | Method and Description |
---|---|
org.apache.beam.runners.fnexecution.control.OutputReceiverFactory |
createOutputReceiverFactory() |
String |
getInputOutputCoderUrn() |
abstract TypeSerializer<IN> |
getInputTypeSerializer()
Returns the TypeSerializer for input elements.
|
FlinkFnApi.UserDefinedFunctions |
getUserDefinedFunctionsProto()
Gets the proto representation of the Python user-defined functions to be executed.
|
void |
open()
Prepares the Python function runner, such as preparing the Python execution environment, etc.
|
void |
processElement(IN element)
Executes the Python function with the input element.
|
createExecutableStage, getInputType, getOutputType, getUserDefinedFunctionProto
close, createJobBundleFactory, createPythonExecutionEnvironment, finishBundle, startBundle
public AbstractPythonTableFunctionRunner(String taskName, org.apache.beam.sdk.fn.data.FnDataReceiver<byte[]> resultReceiver, PythonFunctionInfo tableFunction, PythonEnvironmentManager environmentManager, RowType inputType, RowType outputType, Map<String,String> jobOptions, FlinkMetricContainer flinkMetricContainer)
public void open() throws Exception
PythonFunctionRunner
open
in interface PythonFunctionRunner<IN>
open
in class AbstractPythonFunctionRunner<IN>
Exception
@VisibleForTesting public FlinkFnApi.UserDefinedFunctions getUserDefinedFunctionsProto()
getUserDefinedFunctionsProto
in class AbstractPythonStatelessFunctionRunner<IN>
public void processElement(IN element)
PythonFunctionRunner
public org.apache.beam.runners.fnexecution.control.OutputReceiverFactory createOutputReceiverFactory()
createOutputReceiverFactory
in class AbstractPythonFunctionRunner<IN>
public abstract TypeSerializer<IN> getInputTypeSerializer()
public String getInputOutputCoderUrn()
getInputOutputCoderUrn
in class AbstractPythonStatelessFunctionRunner<IN>
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.