Github user arunmahadevan commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1970#discussion_r108138106
  
    --- Diff: docs/State-checkpointing.md ---
    @@ -161,3 +164,60 @@ The framework instantiates the state via the 
corresponding `StateProvider` imple
     a `StateProvider` implementation which can load and return the state based 
on the namespace. Each state belongs to a unique namespace.
     The namespace is typically unique per task so that each task can have its 
own state. The StateProvider and the corresponding
     State implementation should be available in the class path of Storm (by 
placing them in the extlib directory).
    +
    +
    +### Supported State Backends
    +
    +#### Redis
    +
    +* State provider class name (`topology.state.provider`)
    +
    +`org.apache.storm.redis.state.RedisKeyValueStateProvider`
    +
    +* Provider config (`topology.state.provider.config`)
    +
    +```
    + {
    +   "keyClass": "Optional fully qualified class name of the Key type.",
    +   "valueClass": "Optional fully qualified class name of the Value type.",
    +   "keySerializerClass": "Optional Key serializer implementation class.",
    +   "valueSerializerClass": "Optional Value Serializer implementation 
class.",
    +   "jedisPoolConfig": {
    +     "host": "localhost",
    +     "port": 6379,
    +     "timeout": 2000,
    +     "database": 0,
    +     "password": "xyz"
    +   }
    + }
    + ```
    + 
    +* Artifacts to add (`--artifacts`)
    +
    +`org.apache.storm:storm-redis:<storm-version>`
    +
    +#### HBase
    +
    +NOTE: HBase state provider uses pre-created table and column family, so 
users need to create and provide one to the provider config. 
    +
    +* State provider class name (`topology.state.provider`)
    +
    +`org.apache.storm.hbase.state.HBaseKeyValueStateProvider`
    +
    +* Provider config (`topology.state.provider.config`)
    +        
    +```
    + {
    +   "keyClass": "Optional fully qualified class name of the Key type.",
    +   "valueClass": "Optional fully qualified class name of the Value type.",
    +   "keySerializerClass": "Optional Key serializer implementation class.",
    +   "valueSerializerClass": "Optional Value Serializer implementation 
class.",
    +   "hbaseConfigKey": "config key to load hbase configuration from storm 
root configuration. (similar to storm-hbase)",
    +   "tableName": "Pre-created table name for state.",
    +   "columnFamily": "Pre-created column family for state."
    + }
    + ```
    --- End diff --
    
    may be show an example,
    
    ```java
            Config conf = new Config();
            Map<String, Object> hbConf = new HashMap<String, Object>();
            hbConf.put("hbase.rootdir", "file:///tmp/hbase");
            conf.put("hbase.conf", hbConf);
            conf.put("topology.state.provider",  
"org.apache.storm.hbase.state.HBaseKeyValueStateProvider");
            conf.put("topology.state.provider.config", "{" +
                    "   \"hbaseConfigKey\": \"hbase.conf\"," +
                    "   \"tableName\": \"state\"," +
                    "   \"columnFamily\": \"cf\"" +
                    " }");
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to