org.apache.spark.util

AccumulatorV2

abstract class AccumulatorV2[IN, OUT] extends Serializable

The base class for accumulators, that can accumulate inputs of type IN, and produce output of type OUT.

OUT should be a type that can be read atomically (e.g., Int, Long), or thread-safely (e.g., synchronized collections) because it will be read from other threads.

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. AccumulatorV2
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AccumulatorV2()

Abstract Value Members

  1. abstract def add(v: IN): Unit

    Takes the inputs and accumulates.

  2. abstract def copy(): AccumulatorV2[IN, OUT]

    Creates a new copy of this accumulator.

  3. abstract def isZero: Boolean

    Returns if this accumulator is zero value or not.

    Returns if this accumulator is zero value or not. e.g. for a counter accumulator, 0 is zero value; for a list accumulator, Nil is zero value.

  4. abstract def merge(other: AccumulatorV2[IN, OUT]): Unit

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

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

  5. abstract def reset(): Unit

    Resets this accumulator, which is zero value.

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

  6. abstract def value: OUT

    Defines the current value of this accumulator

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

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

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def copyAndReset(): AccumulatorV2[IN, OUT]

    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.

  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  14. final def id: Long

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

  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. final def isRegistered: Boolean

    Returns true if this accumulator has been registered.

    Returns true if this accumulator has been registered.

    Note

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

  17. final def name: Option[String]

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

  18. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  21. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  22. def toString(): String

    Definition Classes
    AccumulatorV2 → AnyRef → Any
  23. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def writeReplace(): Any

    Attributes
    protected

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped