August 2017
Beginner to intermediate
284 pages
6h 51m
English
The persistentAggregate works on all the tuples across all the batches in a stream and persists the aggregate result into the source of state (memory, Memcached, Cassandra, or some other database). Here is some code that shows how we can use the persistentAggregate:
mystream.persistentAggregate(new MemoryMapState.Factory(),new Fields("select"),new Count(),new Fields("count"));
We will discuss in more detail in the Chapter 5, Trident Topology and Uses, Trident state section.
Read now
Unlock full access