Class LongSum
java.lang.Object
org.apache.storm.streams.operations.aggregators.LongSum
- All Implemented Interfaces:
Serializable
,CombinerAggregator<Number,
,Long, Long> Operation
Computes the long sum of the input values.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionUpdates the accumulator by applying the current accumulator with the value.init()
The initial value of the accumulator to start with.Merges two accumulators and returns the merged accumulator.Produces a result value out of the accumulator.
-
Constructor Details
-
LongSum
public LongSum()
-
-
Method Details
-
init
Description copied from interface:CombinerAggregator
The initial value of the accumulator to start with.- Specified by:
init
in interfaceCombinerAggregator<Number,
Long, Long> - Returns:
- the initial value of the accumulator
-
apply
Description copied from interface:CombinerAggregator
Updates the accumulator by applying the current accumulator with the value.- Specified by:
apply
in interfaceCombinerAggregator<Number,
Long, Long> - Parameters:
aggregate
- the current accumulatorvalue
- the value- Returns:
- the updated accumulator
-
merge
Description copied from interface:CombinerAggregator
Merges two accumulators and returns the merged accumulator.- Specified by:
merge
in interfaceCombinerAggregator<Number,
Long, Long> - Parameters:
accum1
- the first accumulatoraccum2
- the second accumulator- Returns:
- the merged accumulator
-
result
Description copied from interface:CombinerAggregator
Produces a result value out of the accumulator.- Specified by:
result
in interfaceCombinerAggregator<Number,
Long, Long> - Parameters:
accum
- the accumulator- Returns:
- the result
-