Takes the inputs and accumulates.
Takes the inputs and accumulates.
Creates a new copy of this accumulator.
Creates a new copy of this accumulator.
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.
Returns the id of this accumulator, can only be called after registration.
Returns the id of this accumulator, can only be called after registration.
Returns true if this accumulator has been registered.
Returns true if this accumulator has been registered.
All accumulators must be registered before use, or it will throw exception.
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.
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.
Returns the name of this accumulator, can only be called after registration.
Returns the name of this accumulator, can only be called after registration.
Child classes must implement readKryo() and cannot override this.
Child classes must implement readKryo() and cannot override this.
Resets this accumulator, which is zero value.
Resets this accumulator, which is zero value. i.e. call isZero
must
return true.
Creates an AccumulableInfo representation of this AccumulatorV2 with the provided values.
Creates an AccumulableInfo representation of this AccumulatorV2 with the provided values.
Defines the current value of this accumulator
Defines the current value of this accumulator
Child classes cannot override this and must instead implement writeKryo/readKryo for consistent writeReplace() behavior.
Child classes cannot override this and must instead implement writeKryo/readKryo for consistent writeReplace() behavior.
A metric used in a SQL query plan. This is implemented as an AccumulatorV2. Updates on the executor side are automatically propagated and shown in the SQL UI through metrics. Updates on the driver side must be explicitly posted using SQLMetrics.postDriverMetricUpdates().