public interface JsonUnivariateAggregator
JsonUnivariateAggregate
defined aggregate.Modifier and Type | Method and Description |
---|---|
void |
clear(com.google.gson.JsonElement partitionKey,
int n)
Clear the aggregator to prepare for a new aggregation.
|
void |
increment(double value)
Add a value to the aggregation.
|
void |
result(com.google.gson.JsonElement partitionKey,
com.google.gson.JsonObject result)
Place the result of the aggregation into the
result
object. |
void clear(com.google.gson.JsonElement partitionKey, int n)
partitionKey
- Partition key.n
- Number of tuples to be aggregated.void increment(double value)
value
- Value to be added.void result(com.google.gson.JsonElement partitionKey, com.google.gson.JsonObject result)
result
object. The key for the result must be
JsonUnivariateAggregate.name()
for the corresponding
aggregate. The value of the aggregation may be a primitive value
such as a double
or any valid JSON element.partitionKey
- Partition key.result
- JSON object holding the result.Copyright © 2016 The Apache Software Foundation. All Rights Reserved - bbe71fa-20161201-1641