Class FlinkExecutableStageFunction<InputT>
java.lang.Object
org.apache.flink.api.common.functions.AbstractRichFunction
org.apache.beam.runners.flink.translation.functions.FlinkExecutableStageFunction<InputT>
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.functions.Function,org.apache.flink.api.common.functions.GroupReduceFunction<WindowedValue<InputT>,,RawUnionValue> org.apache.flink.api.common.functions.MapPartitionFunction<WindowedValue<InputT>,,RawUnionValue> org.apache.flink.api.common.functions.RichFunction
public class FlinkExecutableStageFunction<InputT>
extends org.apache.flink.api.common.functions.AbstractRichFunction
implements org.apache.flink.api.common.functions.MapPartitionFunction<WindowedValue<InputT>,RawUnionValue>, org.apache.flink.api.common.functions.GroupReduceFunction<WindowedValue<InputT>,RawUnionValue>
Flink operator that passes its input DataSet through an SDK-executed
ExecutableStage.
The output of this operation is a multiplexed DataSet whose elements are tagged with a union
coder. The coder's tags are determined by the output coder map. The resulting data set should be
further processed by a FlinkExecutableStagePruningFunction.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFlinkExecutableStageFunction(String stepName, PipelineOptions pipelineOptions, org.apache.beam.model.pipeline.v1.RunnerApi.ExecutableStagePayload stagePayload, JobInfo jobInfo, Map<String, Integer> outputMap, FlinkExecutableStageContextFactory contextFactory, Coder windowCoder, Coder<WindowedValue<InputT>> inputCoder) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidmapPartition(Iterable<WindowedValue<InputT>> iterable, org.apache.flink.util.Collector<RawUnionValue> collector) For non-stateful processing via a simple MapPartitionFunction.voidopen(org.apache.flink.configuration.Configuration parameters) voidreduce(Iterable<WindowedValue<InputT>> iterable, org.apache.flink.util.Collector<RawUnionValue> collector) For stateful and timer processing via a GroupReduceFunction.Methods inherited from class org.apache.flink.api.common.functions.AbstractRichFunction
getIterationRuntimeContext, getRuntimeContext, setRuntimeContext
-
Constructor Details
-
FlinkExecutableStageFunction
public FlinkExecutableStageFunction(String stepName, PipelineOptions pipelineOptions, org.apache.beam.model.pipeline.v1.RunnerApi.ExecutableStagePayload stagePayload, JobInfo jobInfo, Map<String, Integer> outputMap, FlinkExecutableStageContextFactory contextFactory, Coder windowCoder, Coder<WindowedValue<InputT>> inputCoder)
-
-
Method Details
-
open
public void open(org.apache.flink.configuration.Configuration parameters) - Specified by:
openin interfaceorg.apache.flink.api.common.functions.RichFunction- Overrides:
openin classorg.apache.flink.api.common.functions.AbstractRichFunction
-
mapPartition
public void mapPartition(Iterable<WindowedValue<InputT>> iterable, org.apache.flink.util.Collector<RawUnionValue> collector) throws Exception For non-stateful processing via a simple MapPartitionFunction.- Specified by:
mapPartitionin interfaceorg.apache.flink.api.common.functions.MapPartitionFunction<WindowedValue<InputT>,RawUnionValue> - Throws:
Exception
-
reduce
public void reduce(Iterable<WindowedValue<InputT>> iterable, org.apache.flink.util.Collector<RawUnionValue> collector) throws Exception For stateful and timer processing via a GroupReduceFunction.- Specified by:
reducein interfaceorg.apache.flink.api.common.functions.GroupReduceFunction<WindowedValue<InputT>,RawUnionValue> - Throws:
Exception
-
close
- Specified by:
closein interfaceorg.apache.flink.api.common.functions.RichFunction- Overrides:
closein classorg.apache.flink.api.common.functions.AbstractRichFunction- Throws:
Exception
-