Interface Accumulator<V,​R extends Serializable>

    • Method Detail

      • add

        void add​(V value)
        Parameters:
        value - The value to add to the accumulator object
      • getLocalValue

        R getLocalValue()
        Returns:
        local The local value from the current UDF context
      • resetLocal

        void resetLocal()
        Reset the local value. This only affects the current UDF context.
      • merge

        void merge​(Accumulator<V,​R> other)
        Used by system internally to merge the collected parts of an accumulator at the end of the job.
        Parameters:
        other - Reference to accumulator to merge in.
      • clone

        Accumulator<V,​R> clone()
        Duplicates the accumulator. All subclasses need to properly implement cloning and cannot throw a CloneNotSupportedException
        Returns:
        The duplicated accumulator.