Review Board 1.7.22


HIVE-4489: beeline always return the same error message twice

Review Request #10917 - Created May 3, 2013 and updated

Chaoyu Tang
HIVE-4489
Reviewers
hive
hive-git
Beeline always returns the same error message twice -- because the error is logged out both in an exception catch block and its outer re-catch block.
Have done the tests.

Diff revision 2 (Latest)

1 2
1 2

  1. beeline/src/java/org/apache/hive/beeline/Commands.java: Loading...
beeline/src/java/org/apache/hive/beeline/Commands.java
Revision 8e2a52f New Change
[20] 768 lines
[+20] [+] private boolean execute(String line, boolean call) {
769
          int count = stmnt.getUpdateCount();
769
          int count = stmnt.getUpdateCount();
770
          long end = System.currentTimeMillis();
770
          long end = System.currentTimeMillis();
771
          beeLine.info(beeLine.loc("rows-affected", count)
771
          beeLine.info(beeLine.loc("rows-affected", count)
772
              + " " + beeLine.locElapsedTime(end - start));
772
              + " " + beeLine.locElapsedTime(end - start));
773
        }
773
        }
774
      } catch (Exception e) {

   
775
        beeLine.error(e);

   
776
        throw e;

   
777
      } finally {
774
      } finally {
778
        if (stmnt != null) {
775
        if (stmnt != null) {
779
          stmnt.close();
776
          stmnt.close();
780
        }
777
        }
781
      }
778
      }
[+20] [20] 517 lines
  1. beeline/src/java/org/apache/hive/beeline/Commands.java: Loading...