Class LongCounter

    • Constructor Detail

      • LongCounter

        public LongCounter()
      • LongCounter

        public LongCounter​(long value)
    • Method Detail

      • add

        public void add​(Long value)
        Consider using add(long) instead for primitive long values
        Specified by:
        add in interface Accumulator<Long,​Long>
        Parameters:
        value - The value to add to the accumulator object
      • merge

        public void merge​(Accumulator<Long,​Long> other)
        Description copied from interface: Accumulator
        Used by system internally to merge the collected parts of an accumulator at the end of the job.
        Specified by:
        merge in interface Accumulator<Long,​Long>
        Parameters:
        other - Reference to accumulator to merge in.
      • resetLocal

        public void resetLocal()
        Description copied from interface: Accumulator
        Reset the local value. This only affects the current UDF context.
        Specified by:
        resetLocal in interface Accumulator<Long,​Long>
      • add

        public void add​(long value)
      • getLocalValuePrimitive

        public long getLocalValuePrimitive()