Package org.apache.storm.starter
Class StatefulTopology
java.lang.Object
org.apache.storm.starter.StatefulTopology
An example topology that demonstrates the use of 
IStatefulBolt to manage state. To run the example,
 $ storm jar examples/storm-starter/storm-starter-topologies-*.jar storm.starter.StatefulTopology statetopologyThe default state used is 'InMemoryKeyValueState' which does not persist the state across restarts. You could use 'RedisKeyValueState' to test state persistence by setting below property in conf/storm.yaml
topology.state.provider: org.apache.storm.redis.state.RedisKeyValueStateProviderYou should also start a local redis instance before running the 'storm jar' command. The default RedisKeyValueStateProvider parameters can be overridden in conf/storm.yaml, for e.g.
 topology.state.provider.config: '{"keyClass":"...", "valueClass":"...",
                                   "keySerializerClass":"...", "valueSerializerClass":"...",
                                   "jedisPoolConfig":{"host":"localhost", "port":6379,
                                      "timeout":2000, "database":0, "password":"xyz"}}'
 
 - 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructors
- 
Method Summary
- 
Constructor Details- 
StatefulTopologypublic StatefulTopology()
 
- 
- 
Method Details- 
main- Throws:
- Exception
 
 
-