Simplifying just aggregating up

A major use case of MapReduce comprises performing simple aggregation operations on data, such as min, max, average, and sum. Both of our previous examples were pretty much exactly that. As we can see from the previous code, the reducers and combiners are pretty generic, with a fair amount of code repetition. To avoid this, Hazelcast provides us with a more simplified interface to perform aggregations that sit on top of MapReduce and is exposed via the distributed collections, hiding a fair amount of the internal complexity and dealing with a few performance optimizations for us.

It features two alternative classes to the ones that we previously encountered—a Supplier object to obtain and provide data and an Aggregation ...

Get Getting Started with Hazelcast - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.