Class BeamTablePythonFunctionRunner
- java.lang.Object
-
- org.apache.flink.streaming.api.runners.python.beam.BeamPythonFunctionRunner
-
- org.apache.flink.table.runtime.runners.python.beam.BeamTablePythonFunctionRunner
-
- All Implemented Interfaces:
AutoCloseable,PythonFunctionRunner
@Internal public class BeamTablePythonFunctionRunner extends BeamPythonFunctionRunner
ABeamTablePythonFunctionRunnerused to execute Python functions in Table API.
-
-
Field Summary
-
Fields inherited from class org.apache.flink.streaming.api.runners.python.beam.BeamPythonFunctionRunner
inputCoderDescriptor, LOG, mainInputReceiver, outputCoderDescriptor, resultBuffer, sideOutputCoderDescriptors
-
-
Constructor Summary
Constructors Constructor Description BeamTablePythonFunctionRunner(String taskName, ProcessPythonEnvironmentManager environmentManager, String functionUrn, com.google.protobuf.GeneratedMessageV3 userDefinedFunctionProto, FlinkMetricContainer flinkMetricContainer, org.apache.flink.runtime.state.KeyedStateBackend<?> keyedStateBackend, org.apache.flink.api.common.typeutils.TypeSerializer<?> keySerializer, org.apache.flink.api.common.typeutils.TypeSerializer<?> namespaceSerializer, org.apache.flink.runtime.memory.MemoryManager memoryManager, double managedMemoryFraction, FlinkFnApi.CoderInfoDescriptor inputCoderDescriptor, FlinkFnApi.CoderInfoDescriptor outputCoderDescriptor)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbuildTransforms(org.apache.beam.model.pipeline.v1.RunnerApi.Components.Builder componentsBuilder)protected Optional<org.apache.beam.model.pipeline.v1.RunnerApi.Coder>getOptionalTimerCoderProto()protected List<org.apache.beam.runners.core.construction.graph.TimerReference>getTimers(org.apache.beam.model.pipeline.v1.RunnerApi.Components components)voidprocessTimer(byte[] timerData)Send the triggered timer to the Python function.static BeamTablePythonFunctionRunnerstateful(String taskName, ProcessPythonEnvironmentManager environmentManager, String functionUrn, com.google.protobuf.GeneratedMessageV3 userDefinedFunctionProto, FlinkMetricContainer flinkMetricContainer, org.apache.flink.runtime.state.KeyedStateBackend<?> keyedStateBackend, org.apache.flink.api.common.typeutils.TypeSerializer<?> keySerializer, org.apache.flink.api.common.typeutils.TypeSerializer<?> namespaceSerializer, org.apache.flink.runtime.memory.MemoryManager memoryManager, double managedMemoryFraction, FlinkFnApi.CoderInfoDescriptor inputCoderDescriptor, FlinkFnApi.CoderInfoDescriptor outputCoderDescriptor)static BeamTablePythonFunctionRunnerstateless(String taskName, ProcessPythonEnvironmentManager environmentManager, String functionUrn, com.google.protobuf.GeneratedMessageV3 userDefinedFunctionProto, FlinkMetricContainer flinkMetricContainer, org.apache.flink.runtime.memory.MemoryManager memoryManager, double managedMemoryFraction, FlinkFnApi.CoderInfoDescriptor inputCoderDescriptor, FlinkFnApi.CoderInfoDescriptor outputCoderDescriptor)-
Methods inherited from class org.apache.flink.streaming.api.runners.python.beam.BeamPythonFunctionRunner
close, createJobBundleFactory, flush, notifyNoMoreResults, open, pollResult, process, startBundle, takeResult
-
-
-
-
Constructor Detail
-
BeamTablePythonFunctionRunner
public BeamTablePythonFunctionRunner(String taskName, ProcessPythonEnvironmentManager environmentManager, String functionUrn, com.google.protobuf.GeneratedMessageV3 userDefinedFunctionProto, FlinkMetricContainer flinkMetricContainer, org.apache.flink.runtime.state.KeyedStateBackend<?> keyedStateBackend, org.apache.flink.api.common.typeutils.TypeSerializer<?> keySerializer, org.apache.flink.api.common.typeutils.TypeSerializer<?> namespaceSerializer, org.apache.flink.runtime.memory.MemoryManager memoryManager, double managedMemoryFraction, FlinkFnApi.CoderInfoDescriptor inputCoderDescriptor, FlinkFnApi.CoderInfoDescriptor outputCoderDescriptor)
-
-
Method Detail
-
buildTransforms
protected void buildTransforms(org.apache.beam.model.pipeline.v1.RunnerApi.Components.Builder componentsBuilder)
- Specified by:
buildTransformsin classBeamPythonFunctionRunner
-
getTimers
protected List<org.apache.beam.runners.core.construction.graph.TimerReference> getTimers(org.apache.beam.model.pipeline.v1.RunnerApi.Components components)
- Specified by:
getTimersin classBeamPythonFunctionRunner
-
getOptionalTimerCoderProto
protected Optional<org.apache.beam.model.pipeline.v1.RunnerApi.Coder> getOptionalTimerCoderProto()
- Specified by:
getOptionalTimerCoderProtoin classBeamPythonFunctionRunner
-
processTimer
public void processTimer(byte[] timerData) throws ExceptionDescription copied from interface:PythonFunctionRunnerSend the triggered timer to the Python function.- Specified by:
processTimerin interfacePythonFunctionRunner- Overrides:
processTimerin classBeamPythonFunctionRunner- Throws:
Exception
-
stateless
public static BeamTablePythonFunctionRunner stateless(String taskName, ProcessPythonEnvironmentManager environmentManager, String functionUrn, com.google.protobuf.GeneratedMessageV3 userDefinedFunctionProto, FlinkMetricContainer flinkMetricContainer, org.apache.flink.runtime.memory.MemoryManager memoryManager, double managedMemoryFraction, FlinkFnApi.CoderInfoDescriptor inputCoderDescriptor, FlinkFnApi.CoderInfoDescriptor outputCoderDescriptor)
-
stateful
public static BeamTablePythonFunctionRunner stateful(String taskName, ProcessPythonEnvironmentManager environmentManager, String functionUrn, com.google.protobuf.GeneratedMessageV3 userDefinedFunctionProto, FlinkMetricContainer flinkMetricContainer, org.apache.flink.runtime.state.KeyedStateBackend<?> keyedStateBackend, org.apache.flink.api.common.typeutils.TypeSerializer<?> keySerializer, org.apache.flink.api.common.typeutils.TypeSerializer<?> namespaceSerializer, org.apache.flink.runtime.memory.MemoryManager memoryManager, double managedMemoryFraction, FlinkFnApi.CoderInfoDescriptor inputCoderDescriptor, FlinkFnApi.CoderInfoDescriptor outputCoderDescriptor)
-
-