Class Count<T>

    • Constructor Detail

      • Count

        public Count()
    • Method Detail

      • apply

        public Long apply​(Long accum,
                          T value)
        Description copied from interface: CombinerAggregator
        Updates the accumulator by applying the current accumulator with the value.
        Specified by:
        apply in interface CombinerAggregator<T,​Long,​Long>
        Parameters:
        accum - the current accumulator
        value - the value
        Returns:
        the updated accumulator
      • merge

        public Long merge​(Long accum1,
                          Long accum2)
        Description copied from interface: CombinerAggregator
        Merges two accumulators and returns the merged accumulator.
        Specified by:
        merge in interface CombinerAggregator<T,​Long,​Long>
        Parameters:
        accum1 - the first accumulator
        accum2 - the second accumulator
        Returns:
        the merged accumulator