Packages

c

org.apache.spark.util

LongAccumulator

class LongAccumulator extends AccumulatorV2[Long, Long]

An accumulator for computing sum, count, and average of 64-bit integers.

Source
AccumulatorV2.scala
Since

2.0.0

Linear Supertypes
AccumulatorV2[Long, Long], Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LongAccumulator
  2. AccumulatorV2
  3. Serializable
  4. Serializable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new LongAccumulator()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def add(v: Long): Unit

    Adds v to the accumulator, i.e.

    Adds v to the accumulator, i.e. increment sum by v and count by 1.

    Since

    2.0.0

  5. def add(v: Long): Unit

    Adds v to the accumulator, i.e.

    Adds v to the accumulator, i.e. increment sum by v and count by 1.

    Definition Classes
    LongAccumulatorAccumulatorV2
    Since

    2.0.0

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def avg: Double

    Returns the average of elements added to the accumulator.

    Returns the average of elements added to the accumulator.

    Since

    2.0.0

  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @IntrinsicCandidate()
  9. def copy(): LongAccumulator

    Creates a new copy of this accumulator.

    Creates a new copy of this accumulator.

    Definition Classes
    LongAccumulatorAccumulatorV2
  10. def copyAndReset(): AccumulatorV2[Long, Long]

    Creates a new copy of this accumulator, which is zero value.

    Creates a new copy of this accumulator, which is zero value. i.e. call isZero on the copy must return true.

    Definition Classes
    AccumulatorV2
  11. def count: Long

    Returns the number of elements added to the accumulator.

    Returns the number of elements added to the accumulator.

    Since

    2.0.0

  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  16. final def id: Long

    Returns the id of this accumulator, can only be called after registration.

    Returns the id of this accumulator, can only be called after registration.

    Definition Classes
    AccumulatorV2
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. final def isRegistered: Boolean

    Returns true if this accumulator has been registered.

    Returns true if this accumulator has been registered.

    Definition Classes
    AccumulatorV2
    Note

    All accumulators must be registered before use, or it will throw exception.

  19. def isZero: Boolean

    Returns false if this accumulator has had any values added to it or the sum is non-zero.

    Returns false if this accumulator has had any values added to it or the sum is non-zero.

    Definition Classes
    LongAccumulatorAccumulatorV2
    Since

    2.0.0

  20. def merge(other: AccumulatorV2[Long, Long]): Unit

    Merges another same-type accumulator into this one and update its state, i.e.

    Merges another same-type accumulator into this one and update its state, i.e. this should be merge-in-place.

    Definition Classes
    LongAccumulatorAccumulatorV2
  21. final def name: Option[String]

    Returns the name of this accumulator, can only be called after registration.

    Returns the name of this accumulator, can only be called after registration.

    Definition Classes
    AccumulatorV2
  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  25. def reset(): Unit

    Resets this accumulator, which is zero value.

    Resets this accumulator, which is zero value. i.e. call isZero must return true.

    Definition Classes
    LongAccumulatorAccumulatorV2
  26. def sum: Long

    Returns the sum of elements added to the accumulator.

    Returns the sum of elements added to the accumulator.

    Since

    2.0.0

  27. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  28. def toString(): String
    Definition Classes
    AccumulatorV2 → AnyRef → Any
  29. def value: Long

    Defines the current value of this accumulator

    Defines the current value of this accumulator

    Definition Classes
    LongAccumulatorAccumulatorV2
  30. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  32. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. def withBufferSerialized(): AccumulatorV2[Long, Long]
    Attributes
    protected
    Definition Classes
    AccumulatorV2
  34. final def writeReplace(): Any
    Attributes
    protected
    Definition Classes
    AccumulatorV2

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from AccumulatorV2[Long, Long]

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped