Search code examples
apache-stormtrident

How to create serial TridentState bolts using partitionpersist in Apache Storm?


I was able to process a stream of events in batches using the partitionpersist api provided with TridentState. But now, I want to emit the processed values of this bolt and collect them as another batch of events in a following bolt.


Solution

  • The state.newValuesStream() method on your TridentState does exactly that -- it returns a stream of newly updated values from your TridentState.