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

    https://github.com/apache/storm/pull/871#discussion_r44598767
  
    --- Diff: 
external/storm-hive/src/main/java/org/apache/storm/hive/bolt/HiveBolt.java ---
    @@ -134,22 +131,16 @@ public void execute(Tuple tuple) {
                         collector.ack(t);
                     tupleBatch.clear();
                 }
    +        } catch(SerializationError se) {
    +            LOG.info("Serialization exception occurred, tuple is 
acknowledged but not written to Hive.", tuple);
    +            collector.ack(tuple);
             } catch(Exception e) {
                 this.collector.reportError(e);
                 collector.fail(tuple);
    -            try {
    -                flushAndCloseWriters();
    -                LOG.info("acknowledging tuples after writers flushed and 
closed");
    -                for (Tuple t : tupleBatch)
    -                    collector.ack(t);
    -                tupleBatch.clear();
    -            } catch (Exception e1) {
    -                //If flushAndClose fails assume tuples are lost, do not ack
    -                LOG.warn("Error while flushing and closing writers, tuples 
will NOT be acknowledged");
    -                for (Tuple t : tupleBatch)
    -                    collector.fail(t);
    -                tupleBatch.clear();
    -            }
    +            for (Tuple t : tupleBatch)
    --- End diff --
    
    Could you wrap the body of this in '{}' I know it is just one line, but for 
coding conventions sake.


---
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