Class FlinkMergingNonShuffleReduceFunction<K,InputT,AccumT,OutputT,W extends BoundedWindow>
java.lang.Object
org.apache.flink.api.common.functions.AbstractRichFunction
org.apache.flink.api.common.functions.RichGroupReduceFunction<WindowedValue<KV<K,InputT>>,WindowedValue<KV<K,OutputT>>>
org.apache.beam.runners.flink.translation.functions.FlinkMergingNonShuffleReduceFunction<K,InputT,AccumT,OutputT,W>
- All Implemented Interfaces:
Serializable
,org.apache.flink.api.common.functions.Function
,org.apache.flink.api.common.functions.GroupReduceFunction<WindowedValue<KV<K,
,InputT>>, WindowedValue<KV<K, OutputT>>> org.apache.flink.api.common.functions.RichFunction
public class FlinkMergingNonShuffleReduceFunction<K,InputT,AccumT,OutputT,W extends BoundedWindow>
extends org.apache.flink.api.common.functions.RichGroupReduceFunction<WindowedValue<KV<K,InputT>>,WindowedValue<KV<K,OutputT>>>
Special version of
FlinkReduceFunction
that supports merging windows.
This is different from the pair of function for the non-merging windows case in that we cannot do combining before the shuffle because elements would not yet be in their correct windows for side-input access.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFlinkMergingNonShuffleReduceFunction
(CombineFnBase.GlobalCombineFn<InputT, AccumT, OutputT> combineFn, WindowingStrategy<Object, W> windowingStrategy, Map<PCollectionView<?>, WindowingStrategy<?, ?>> sideInputs, PipelineOptions pipelineOptions) -
Method Summary
Methods inherited from class org.apache.flink.api.common.functions.AbstractRichFunction
close, getIterationRuntimeContext, getRuntimeContext, setRuntimeContext
-
Constructor Details
-
FlinkMergingNonShuffleReduceFunction
public FlinkMergingNonShuffleReduceFunction(CombineFnBase.GlobalCombineFn<InputT, AccumT, OutputT> combineFn, WindowingStrategy<Object, W> windowingStrategy, Map<PCollectionView<?>, WindowingStrategy<?, ?>> sideInputs, PipelineOptions pipelineOptions)
-
-
Method Details
-
open
public void open(org.apache.flink.configuration.Configuration parameters) - Specified by:
open
in interfaceorg.apache.flink.api.common.functions.RichFunction
- Overrides:
open
in classorg.apache.flink.api.common.functions.AbstractRichFunction
-
reduce
public void reduce(Iterable<WindowedValue<KV<K, InputT>>> elements, org.apache.flink.util.Collector<WindowedValue<KV<K, throws ExceptionOutputT>>> out)
-