T
- the value typepublic class Count<T> extends Object implements CombinerAggregator<T,Long,Long>
Constructor and Description |
---|
Count() |
Modifier and Type | Method and Description |
---|---|
Long |
apply(Long accum,
T value)
Updates the accumulator by applying the current accumulator with the value.
|
Long |
init()
The initial value of the accumulator to start with.
|
Long |
merge(Long accum1,
Long accum2)
Merges two accumulators and returns the merged accumulator.
|
Long |
result(Long accum)
Produces a result value out of the accumulator.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
of
public Long init()
CombinerAggregator
init
in interface CombinerAggregator<T,Long,Long>
public Long apply(Long accum, T value)
CombinerAggregator
apply
in interface CombinerAggregator<T,Long,Long>
accum
- the current accumulatorvalue
- the valuepublic Long merge(Long accum1, Long accum2)
CombinerAggregator
merge
in interface CombinerAggregator<T,Long,Long>
accum1
- the first accumulatoraccum2
- the second accumulatorpublic Long result(Long accum)
CombinerAggregator
result
in interface CombinerAggregator<T,Long,Long>
accum
- the accumulatorCopyright © 2023 The Apache Software Foundation. All rights reserved.