You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@storm.apache.org by "Magnus Koch (JIRA)" <ji...@apache.org> on 2016/11/16 13:06:58 UTC

[jira] [Commented] (STORM-1369) Add trident MapState to Cassandra

    [ https://issues.apache.org/jira/browse/STORM-1369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15670386#comment-15670386 ] 

Magnus Koch commented on STORM-1369:
------------------------------------

Picked this up, because we need it internally.

Implementation is available at https://github.com/ef-labs/storm/tree/feature/STORM-1369-on-master/external/storm-cassandra

The README shows the basic usage of it, and there is a unit test that implements the word count example for opaque, transactional and nontransactional map states.

The approach was to reuse much of the existing features (e.g. CQL tuple mappers) and only adding a few things to wire them together with an IBackingMap. 

Notably:
 * There is now a StateMapper which converts the map state (which is generic and can be opaque/transactional) to/from a tuple format.
 * There is a new async execution option with an AsyncResultSetHandler to collect the results - this is used by the MapState implementation which by default queries Cassandra for multiple keys in parallel.
 * There is a builder class to simplify construction, which builds the CQL statements for you. This is not strictly necessary but it really does help usage and readability for most cases.


> Add trident MapState to Cassandra
> ---------------------------------
>
>                 Key: STORM-1369
>                 URL: https://issues.apache.org/jira/browse/STORM-1369
>             Project: Apache Storm
>          Issue Type: Improvement
>          Components: storm-cassandra
>            Reporter: Satish Duggana
>            Assignee: Satish Duggana
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)