Merge two accumulated values together.
Merge two accumulated values together. Is allowed to modify and return the first value for efficiency (to avoid allocating objects).
one set of accumulated data
another set of accumulated data
both data sets merged together
Return the "zero" (identity) value for an accumulator type, given its initial value.
Return the "zero" (identity) value for an accumulator type, given its initial value. For example, if R was a vector of N dimensions, this would return a vector of N zeroes.
Add additional data to the accumulator value.
Add additional data to the accumulator value. Is allowed to modify and return r
for efficiency (to avoid allocating objects).
the new value of the accumulator
A simpler version of org.apache.spark.AccumulableParam where the only data type you can add in is the same type as the accumulated value. An implicit AccumulatorParam object needs to be available when you create Accumulators of a specific type.
type of value to accumulate