R - The type of reference used by tuples.public class Aggregator<R> extends Processor<R,PassThroughFunctionContext<R,AggregateFunction>>
Aggregator is a Processor that applies
AggregateFunctions to a set of input Tuples, combining them to
produce a single output tuple. Typically, a client will group tuples together in some way and use an
Aggregator to combine them a group at a time, initialising the functions between each group.| Modifier and Type | Class and Description |
|---|---|
static class |
Aggregator.Builder<R>
Implementation of the Builder pattern for
Aggregator. |
| Constructor and Description |
|---|
Aggregator() |
| Modifier and Type | Method and Description |
|---|---|
void |
aggregate(Tuple<R> tuple)
Aggregate an input
Tuple using AggregateFunctions. |
Aggregator<R> |
clone()
Create a deep copy of this
Aggregator. |
boolean |
equals(Object o) |
int |
hashCode() |
void |
initFunctions()
Initialise the
AggregateFunctions used by this Aggregator. |
void |
state(Tuple<R> tuple)
Write the current aggregated results into an output
Tuple. |
String |
toString() |
addFunction, addFunctions, getFunctionspublic void initFunctions()
AggregateFunctions used by this Aggregator.public void aggregate(Tuple<R> tuple)
Tuple using AggregateFunctions.tuple - Tuple to be aggregated.public void state(Tuple<R> tuple)
Tuple.tuple - Output Tuple.public Aggregator<R> clone()
Aggregator.clone in class Processor<R,PassThroughFunctionContext<R,AggregateFunction>>Aggregator.public boolean equals(Object o)
equals in class Processor<R,PassThroughFunctionContext<R,AggregateFunction>>public int hashCode()
hashCode in class Processor<R,PassThroughFunctionContext<R,AggregateFunction>>public String toString()
toString in class Processor<R,PassThroughFunctionContext<R,AggregateFunction>>Copyright © 2017. All rights reserved.