spark

Accumulator

class Accumulator[T] extends Accumulable[T, T]

A simpler value of Accumulable where the result type being accumulated is the same as the types of elements being merged.

T

result type

Linear Supertypes
Accumulable[T, T], Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Accumulator
  2. Accumulable
  3. Serializable
  4. AnyRef
  5. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Accumulator(initialValue: T, param: AccumulatorParam[T])

    initialValue

    initial value of accumulator

    param

    helper object defining how to add elements of type T

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. def ++=(term: T): Unit

    Merge two accumulable objects together

    Merge two accumulable objects together

    Normally, a user will not want to use this version, but will instead call +=.

    term

    the other R that will get merged with this

    Definition Classes
    Accumulable
  5. def +=(term: T): Unit

    Add more data to this accumulator / accumulable

    Add more data to this accumulator / accumulable

    term

    the data to add

    Definition Classes
    Accumulable
  6. final def ==(arg0: AnyRef): Boolean

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

    Definition Classes
    Any
  8. def add(term: T): Unit

    Add more data to this accumulator / accumulable

    Add more data to this accumulator / accumulable

    term

    the data to add

    Definition Classes
    Accumulable
  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  11. var deserialized: Boolean

    Definition Classes
    Accumulable
  12. final def eq(arg0: AnyRef): Boolean

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

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

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

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

    Definition Classes
    AnyRef → Any
  17. val id: Long

    Definition Classes
    Accumulable
  18. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  19. def localValue: T

    Get the current value of this accumulator from within a task.

    Get the current value of this accumulator from within a task.

    This is NOT the global value of the accumulator. To get the global value after a completed operation on the dataset, call value.

    The typical use of this method is to directly mutate the local value, eg., to add an element to a Set.

    Definition Classes
    Accumulable
  20. def merge(term: T): Unit

    Merge two accumulable objects together

    Merge two accumulable objects together

    Normally, a user will not want to use this version, but will instead call add.

    term

    the other R that will get merged with this

    Definition Classes
    Accumulable
  21. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  24. def setValue(newValue: T): Unit

    Set the accumulator's value; only allowed on master

    Set the accumulator's value; only allowed on master

    Definition Classes
    Accumulable
  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  26. def toString(): String

    Definition Classes
    Accumulable → AnyRef → Any
  27. def value: T

    Access the accumulator's current value; only allowed on master.

    Access the accumulator's current value; only allowed on master.

    Definition Classes
    Accumulable
  28. def value_=(newValue: T): Unit

    Set the accumulator's value; only allowed on master.

    Set the accumulator's value; only allowed on master.

    Definition Classes
    Accumulable
  29. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  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()
  32. val zero: T

    Definition Classes
    Accumulable

Inherited from Accumulable[T, T]

Inherited from Serializable

Inherited from AnyRef

Inherited from Any