Class FlinkDoFnFunction<InputT,OutputT>
java.lang.Object
org.apache.flink.api.common.functions.AbstractRichFunction
org.apache.beam.runners.flink.translation.functions.FlinkDoFnFunction<InputT,OutputT>
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.functions.FlatMapFunction<WindowedValue<InputT>,,WindowedValue<RawUnionValue>> org.apache.flink.api.common.functions.Function,org.apache.flink.api.common.functions.RichFunction
public class FlinkDoFnFunction<InputT,OutputT>
extends org.apache.flink.api.common.functions.AbstractRichFunction
implements org.apache.flink.api.common.functions.FlatMapFunction<WindowedValue<InputT>,WindowedValue<RawUnionValue>>
Encapsulates a
DoFn inside a Flink RichMapPartitionFunction.
We get a mapping from TupleTag to output index and must tag
all outputs with the output number. Afterwards a filter will filter out those elements that are
not to be in a specific output.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFlinkDoFnFunction(DoFn<InputT, OutputT> doFn, String stepName, WindowingStrategy<?, ?> windowingStrategy, Map<PCollectionView<?>, WindowingStrategy<?, ?>> sideInputs, PipelineOptions options, Map<TupleTag<?>, Integer> outputMap, TupleTag<OutputT> mainOutputTag, Coder<InputT> inputCoder, Map<TupleTag<?>, Coder<?>> outputCoderMap, DoFnSchemaInformation doFnSchemaInformation, Map<String, PCollectionView<?>> sideInputMapping) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidflatMap(WindowedValue<InputT> value, org.apache.flink.util.Collector<WindowedValue<RawUnionValue>> out) voidopen(org.apache.flink.configuration.Configuration parameters) Methods inherited from class org.apache.flink.api.common.functions.AbstractRichFunction
getIterationRuntimeContext, getRuntimeContext, setRuntimeContext
-
Constructor Details
-
FlinkDoFnFunction
public FlinkDoFnFunction(DoFn<InputT, OutputT> doFn, String stepName, WindowingStrategy<?, ?> windowingStrategy, Map<PCollectionView<?>, WindowingStrategy<?, ?>> sideInputs, PipelineOptions options, Map<TupleTag<?>, Integer> outputMap, TupleTag<OutputT> mainOutputTag, Coder<InputT> inputCoder, Map<TupleTag<?>, Coder<?>> outputCoderMap, DoFnSchemaInformation doFnSchemaInformation, Map<String, PCollectionView<?>> sideInputMapping)
-
-
Method Details
-
flatMap
public void flatMap(WindowedValue<InputT> value, org.apache.flink.util.Collector<WindowedValue<RawUnionValue>> out) -
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
-
close
- Specified by:
closein interfaceorg.apache.flink.api.common.functions.RichFunction- Overrides:
closein classorg.apache.flink.api.common.functions.AbstractRichFunction- Throws:
Exception
-