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.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to