I'm learning Trident framework. There are several methods on Trident Stream
s for aggregation tuples within a batch, including this one which allows to preform a stateful mapping of the tuples using Aggregator
interface. But unfortunately a built-in counterpart to additionally persist the map state, like other 9 overloadings of persistentAggregate()
, only with Aggregator
as an argument, is not present.
Thus how can I implement the desired functionality by combining lower-level Trident and Storm abstractions and tools? It is pretty hard to explore the API because there is almost no Javadoc documentation.
In other words, persistentAggregate()
methods allow to end stream processing with updating some persistent state:
stream of tuples ---> persistent state
I want to update persistent state and emit different tuples by the way:
stream of tuples ------> stream of different tuples
with
persistent state
Stream.aggregate(Fields, Aggregator, Fields)
doesn't provide fault-tolerance:
stream of tuples ------> stream of different tuples
with
simple in-memory state