Class StateQueryExample

java.lang.Object
org.apache.storm.starter.streams.StateQueryExample

public class StateQueryExample extends Object
An example that uses Stream.stateQuery(StreamState) to query the state

You should start a local redis instance before running the 'storm jar' command. By default the connection will be attempted at localhost:6379. 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"}}'
 
  • Constructor Details

    • StateQueryExample

      public StateQueryExample()
  • Method Details