streamcruncher.test.func.generic
Class TimeWF2PartitionAggTest.TestAggregator
java.lang.Object
streamcruncher.api.aggregator.AbstractAggregator
streamcruncher.test.func.generic.TimeWF2PartitionAggTest.TestAggregator
- Enclosing class:
- TimeWF2PartitionAggTest
public static class TimeWF2PartitionAggTest.TestAggregator
- extends AbstractAggregator
Adds up the int-values of the Order-Id's in the Window and then converts
the sum into a char.
|
Method Summary |
java.lang.String |
aggregate(java.util.List<java.lang.Object[]> removedValues,
java.util.List<java.lang.Object[]> addedValues)
At the end of each Query execution, this method will be called to
aggregate the Events in the Window over which this Aggregate is created. |
void |
init(java.lang.String[] params,
java.util.LinkedHashMap<java.lang.String,java.lang.String> columnNamesAndTypes,
AbstractAggregator.AggregationStage aggregationStage)
Note: This class' method must be invoked even if it is
over-ridden (i.e super.init(...)). |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TimeWF2PartitionAggTest.TestAggregator
public TimeWF2PartitionAggTest.TestAggregator()
init
public void init(java.lang.String[] params,
java.util.LinkedHashMap<java.lang.String,java.lang.String> columnNamesAndTypes,
AbstractAggregator.AggregationStage aggregationStage)
- Description copied from class:
AbstractAggregator
- Note: This class' method must be invoked even if it is
over-ridden (i.e
super.init(...)).
- Overrides:
init in class AbstractAggregator
- Parameters:
params - Parameters that were supplied to the function in the "Running
Query". Ex: A definition such as
with custom(test_fn, order_id, J) as test_fn_val
will produce String[]{"order_id", "J"}columnNamesAndTypes - The same order in which the columns are placed in Lists in
AbstractAggregator.aggregate(List, List).
aggregate
public java.lang.String aggregate(java.util.List<java.lang.Object[]> removedValues,
java.util.List<java.lang.Object[]> addedValues)
- Description copied from class:
AbstractAggregator
At the end of each Query execution, this method will be called to
aggregate the Events in the Window over which this Aggregate is created.
One of the parameters (added/removed) can be null. But,
never both.
- Specified by:
aggregate in class AbstractAggregator
- Parameters:
removedValues - List of rows that were removed in the current cycle. Each
array in the list is a group of columns in that Row.addedValues - List of rows added in the current cycle. Each array in the
list is a group of columns in that Row.
- Returns:
- The aggregated value or
null for some cases (Ex:
In-built functions return a null if the aggregate
calculation yields a NaN). - See Also:
for the names and types of the data/columns.
Copyright © 2006 - 2008 Ashwin Jayaprakash. All Rights Reserved.
(Docs generated on 3-November-2007 )