Class SparkMCounterAccumulator<E>

    • Constructor Detail

      • SparkMCounterAccumulator

        public SparkMCounterAccumulator​(String name)
        Instantiates a new Spark m counter accumulator.
        Parameters:
        name - the name of the accumulator
    • Method Detail

      • increment

        public void increment​(E item,
                              double amount)
        Description copied from interface: MCounterAccumulator
        Increments the given item by the given amount.
        Specified by:
        increment in interface MCounterAccumulator<E>
        Parameters:
        item - the item to increment
        amount - the amount to increment the item by
      • merge

        public void merge​(Counter<? extends E> counter)
        Description copied from interface: MCounterAccumulator
        Merges the given counter with this accumulator
        Specified by:
        merge in interface MCounterAccumulator<E>
        Parameters:
        counter - the counter to merge