Class RichReduceFunction<T>

    • Constructor Detail

      • RichReduceFunction

        public RichReduceFunction()
    • Method Detail

      • reduce

        public abstract T reduce​(T value1,
                                 T value2)
                          throws Exception
        Description copied from interface: ReduceFunction
        The core method of ReduceFunction, combining two values into one value of the same type. The reduce function is consecutively applied to all values of a group until only a single value remains.
        Specified by:
        reduce in interface ReduceFunction<T>
        Parameters:
        value1 - The first value to combine.
        value2 - The second value to combine.
        Returns:
        The combined value of both input values.
        Throws:
        Exception - This method may throw exceptions. Throwing an exception will cause the operation to fail and may trigger recovery.