Package org.apache.storm.starter
Class PersistentWindowingTopology
- java.lang.Object
-
- org.apache.storm.starter.PersistentWindowingTopology
-
public class PersistentWindowingTopology extends Object
An example that demonstrates the usage ofIStatefulWindowedBolt
with window persistence.The framework automatically checkpoints the tuples in the window along with the bolt's state and restores the same during restarts.
This topology uses 'redis' for state persistence, so you should also start a redis instance before deploying. If you are running in local mode you can just start a redis server locally which will be used for storing the state. The default RedisKeyValueStateProvider parameters can be overridden by setting
Config.TOPOLOGY_STATE_PROVIDER_CONFIG
, for e.g.{ "jedisPoolConfig": { "host": "redis-server-host", "port": 6379, "timeout": 2000, "database": 0, "password": "xyz" } }
-
-
Constructor Summary
Constructors Constructor Description PersistentWindowingTopology()
-