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

ASF GitHub Bot commented on STORM-1701:
---------------------------------------

Github user dossett commented on the pull request:

    https://github.com/apache/storm/pull/1327#issuecomment-208371424
  
    There is an interesting issue here.  If the tuple contains malformed JSON 
such that `rowKey(tuple)` throws a ParseException then the HBase bolt will 
never process that message, so a retry seems fruitless.  When a similar 
situation happens in HiveBolt it acknowledges the tuple, logs the error, and 
discards the message 
(https://github.com/apache/storm/blob/master/external/storm-hive/src/main/java/org/apache/storm/hive/bolt/HiveBolt.java#L129-L132).
    
    Something similar might be nice here with a new `InvalidTuple` exception 
into which each implementation of `HBaseMapper` can wrap its specific "this 
tuple will never work" exceptions.  That would also have the nice benefit of 
keeping an implementation specific detail (`throws ParseException`) out of the 
declaration of the very generic `HBaseMapper` and make it easier for users to 
implement their own mappers and have these errors handled correctly.
    
    This approach could be extended to any bolt that uses the mapper strategy 
(e.g. ElasticSearch) or could have its own "will never work" errors, e.g. the 
Avro bolt receiving non-avro messages.


> Add simple JSON mapping to storm-hbase
> --------------------------------------
>
>                 Key: STORM-1701
>                 URL: https://issues.apache.org/jira/browse/STORM-1701
>             Project: Apache Storm
>          Issue Type: Improvement
>          Components: storm-hbase
>            Reporter: Kristopher Kane
>            Priority: Trivial
>             Fix For: 2.0.0
>
>
> storm-hbase includes a way to map Storm fields to HBase CQs.  This adds a 
> similar ability where a single field contains a flat JSON and the keys map to 
> CQs.  The flat JSON must contain the row key.  
> No intention of reverse mapping from HBaseLookUp as the existing HBaseMapper 
> works well for this. 



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

Reply via email to