public class BatchAggregation extends Object
| Modifier and Type | Method and Description |
|---|---|
BatchAggregation |
aggregateBatch(Iterable<Map<String,Object>> objectList)
Aggregates over a batch of iterable list of JSON Objects
|
BatchAggregation |
aggregateBatch(Iterator<Map<String,Object>> objectIterator)
Aggregates over a batch of Iterator of JSON Objects
|
List<Map<String,Object>> |
getFinalResult()
Gets the final result of the aggregation
|
List<Map<String,Object>> |
getItermediateResult()
Gets the result of the aggregation in the current state
|
public BatchAggregation aggregateBatch(Iterator<Map<String,Object>> objectIterator)
objectIterator - JSON Object iteratorthispublic BatchAggregation aggregateBatch(Iterable<Map<String,Object>> objectList)
objectList - Iterable list of JSON Objectsthispublic List<Map<String,Object>> getItermediateResult()
Note:
This process is resource intensive as it creates a copy of the partial result and finalizes computations
However this copy is a shallow copy. Further computations that operate on non-primitive results, such as
CollectOperation and CollectSetOperation will result in intermediate results that
change as more batches are computed. Handle with care. I should just remove this method :|
Use getFinalResult() if you require only the final result of all batches
public List<Map<String,Object>> getFinalResult()
Note:
This process finalizes the computation on the data passed to this system so far, and clears out the
intermediate data. Additional batches of aggregations will be treated as entirely new data.
Copyright © 2016. All rights reserved.