public class LegacyAccumulatorWrapper<R,T> extends AccumulatorV2<T,R>
| Constructor and Description |
|---|
LegacyAccumulatorWrapper(R initialValue,
AccumulableParam<R,T> param) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(T v)
Takes the inputs and accumulates.
|
LegacyAccumulatorWrapper<R,T> |
copy()
Creates a new copy of this accumulator.
|
boolean |
isZero()
Returns if this accumulator is zero value or not.
|
void |
merge(AccumulatorV2<T,R> other)
Merges another same-type accumulator into this one and update its state, i.e.
|
void |
reset()
Resets this accumulator, which is zero value.
|
R |
value()
Defines the current value of this accumulator
|
copyAndReset, id, isRegistered, name, toStringpublic LegacyAccumulatorWrapper(R initialValue, AccumulableParam<R,T> param)
public boolean isZero()
AccumulatorV2isZero in class AccumulatorV2<T,R>public LegacyAccumulatorWrapper<R,T> copy()
AccumulatorV2copy in class AccumulatorV2<T,R>public void reset()
AccumulatorV2isZero must
return true.reset in class AccumulatorV2<T,R>public void add(T v)
AccumulatorV2add in class AccumulatorV2<T,R>v - (undocumented)public void merge(AccumulatorV2<T,R> other)
AccumulatorV2merge in class AccumulatorV2<T,R>other - (undocumented)public R value()
AccumulatorV2value in class AccumulatorV2<T,R>