August 2017
Beginner to intermediate
284 pages
6h 51m
English
The aggregate works on each batch. During the aggregate process, the tuples are first repartitioned using the global operation to combine all the partitions of the same batch into a single partition and then the aggregation function is run on each batch. Here is a piece of code that shows how we can use aggregate:
mystream.aggregate(new Fields("x"), new Count() ,new new Fields("count"))
There are three types of aggregator interface available in Trident:
These three aggregator interfaces can also be used with partitionAggregate.
Read now
Unlock full access