Performs actual grouping and analytical operations on data. Aggregator can perform following operations: Average, Sum, Min, Max, Count, Distinct.
If result after aggregation execution is null than default value of built in Aggregator for that specific type is returned. Custom aggregator, for custom data types and custom functions like Mean, Median, Mode can also be implemented.
public interface IAggregator
This method takes in an Object and contains the logic of applying the aggregation operation on the same node (locally) as is with Combiner. If you wish to combine the values using a aggregator before being sent for further processing in the Reducer, you can use the Aggregate() call.
This method takes in an Object and contains the logic of applying the aggregation operation in the Reduce Phase. If you wish to combine the values using an aggregator, you can use the AggregateAll() call.