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

Magnus Koch edited comment on STORM-1369 at 12/14/16 3:33 PM:
--------------------------------------------------------------

Picked this up, because we need it internally.

Implementation is available in pull requests 
https://github.com/apache/storm/pull/1781 (for master) and 
https://github.com/apache/storm/pull/1782 (for 1.0.x-branch).

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.



was (Author: mkoch1):
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
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>




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

Reply via email to