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

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

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

    https://github.com/apache/storm/pull/871#discussion_r57602797
  
    --- 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 --
    
    I agree. Please wrap the for block with '{}'.


> Hive Connector Fixes
> --------------------
>
>                 Key: STORM-1030
>                 URL: https://issues.apache.org/jira/browse/STORM-1030
>             Project: Apache Storm
>          Issue Type: Bug
>          Components: storm-hive
>            Reporter: Sriharsha Chintalapani
>            Assignee: Sriharsha Chintalapani
>            Priority: Blocker
>             Fix For: 1.0.0
>
>
> 1. Schedule Hive transaction heartbeats outside of execute method.
> 2. Fix retiring idleWriters
> 3. Do not call flush if there is no data added to a txnbatch
> 4. Catch any exception and abort transaction.



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

Reply via email to