T- Type of the elements that this function processes.
O- The type of the elements returned by the user-defined function.
@Public public interface GroupReduceFunction<T,O> extends Function, Serializable
For a reduce functions that works incrementally by combining always two elements, see
The basic syntax for using a grouped GroupReduceFunction is as follows:
Partial computation can significantly improve the performance of a
DataSet<X> input = ...; DataSet<X> result = input.groupBy(<key-definition>).reduceGroup(new MyGroupReduceFunction());
GroupReduceFunction. This technique is also known as applying a Combiner. Implement the
GroupCombineFunctioninterface to enable partial computations, i.e., a combiner for this
values- All records that belong to the given input key.
out- The collector to hand results to.
Exception- This method may throw exceptions. Throwing an exception will cause the operation to fail and may trigger recovery.
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.