public class OperatorStatisticsAccumulator extends Object implements Accumulator<Object,OperatorStatistics>
OperatorStatistics
to track
estimated values for count distinct and heavy hitters.Constructor and Description |
---|
OperatorStatisticsAccumulator() |
OperatorStatisticsAccumulator(OperatorStatisticsConfig config) |
Modifier and Type | Method and Description |
---|---|
void |
add(Object value) |
Accumulator<Object,OperatorStatistics> |
clone()
Duplicates the accumulator.
|
OperatorStatistics |
getLocalValue() |
void |
merge(Accumulator<Object,OperatorStatistics> other)
Used by system internally to merge the collected parts of an accumulator
at the end of the job.
|
void |
resetLocal()
Reset the local value.
|
public OperatorStatisticsAccumulator()
public OperatorStatisticsAccumulator(OperatorStatisticsConfig config)
public void add(Object value)
add
in interface Accumulator<Object,OperatorStatistics>
value
- The value to add to the accumulator objectpublic OperatorStatistics getLocalValue()
getLocalValue
in interface Accumulator<Object,OperatorStatistics>
public void resetLocal()
Accumulator
resetLocal
in interface Accumulator<Object,OperatorStatistics>
public void merge(Accumulator<Object,OperatorStatistics> other)
Accumulator
merge
in interface Accumulator<Object,OperatorStatistics>
other
- Reference to accumulator to merge in.public Accumulator<Object,OperatorStatistics> clone()
Accumulator
CloneNotSupportedException
clone
in interface Accumulator<Object,OperatorStatistics>
clone
in class Object
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.