org.apache.storm.starter.streams

## 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 Summary

    Constructors
    Constructor and Description
    `StateQueryExample()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `main(String[] args)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StateQueryExample

          public StateQueryExample()

  - ### Method Detail

    - #### main

          public static void main(String[] args)
                           throws Exception

      Throws:
        `Exception`

Copyright © 2021 The Apache Software Foundation. All rights reserved.