> A CheckpointSpout is active and checkpoints the state like it should, but the 
> state isn't synchronized between the instances of the StatefulBolt.

 

The state is private to the bolt instance (task). Each bolt task’s state is 
independent and is not synchronized between the instances of the bolt.

 

Thanks,

Arun

 

 

From: Adrian Wersching <mail.adrian.wersch...@gmail.com>
Reply-To: "user@storm.apache.org" <user@storm.apache.org>
Date: Thursday, December 15, 2016 at 8:15 PM
To: "user@storm.apache.org" <user@storm.apache.org>
Subject: Storm BaseStatefulBolt not working

 

Hello, 

we can't get the BaseStatefulBolt to synchronize its KeyValueState.  

We've done everything exaclty like in the example 
(https://github.com/apache/storm/blob/master/examples/storm-starter/src/jvm/storm/starter/StatefulTopology.java),
 except for using multiple workers (and executors).

We emit messages to the StatefulBolt which are then added to the state of the 
bolt. In our case only one instance of the StatefulBolt gets the message (using 
shuffleGrouping) but also only one Bolt updates its state.

We set the state using initState() and ack the input at the end of the execute 
method. We've also tried commiting when changing the state, but that didn't 
seem to change anything.

We've tried it on the production cluster and the LocalCluster.

 

A CheckpointSpout is active and checkpoints the state like it should, but the 
state isn't synchronized between the instances of the StatefulBolt.

 

 

Greetings, 
Adrian Wersching

Reply via email to