Repository: hive
Updated Branches:
  refs/heads/master 267633a24 -> 69f1cd4f3


HIVE-16007 LogRunnable never stops when fails to compile. (Peter Vary, Reviewed 
by Sergey Shelukhin, anishek, Naveen Gangam)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/69f1cd4f
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/69f1cd4f
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/69f1cd4f

Branch: refs/heads/master
Commit: 69f1cd4f3a74485a1c0d4fb4c7fb1e713209d432
Parents: 267633a
Author: Naveen Gangam <ngan...@apache.org>
Authored: Tue Mar 28 14:19:26 2017 -0400
Committer: Naveen Gangam <ngan...@apache.org>
Committed: Tue Mar 28 14:19:26 2017 -0400

----------------------------------------------------------------------
 jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/69f1cd4f/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java
----------------------------------------------------------------------
diff --git a/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java 
b/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java
index a0aea72..c385e2c 100644
--- a/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java
+++ b/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java
@@ -315,9 +315,11 @@ public class HiveStatement implements java.sql.Statement {
       isExecuteStatementFailed = false;
     } catch (SQLException eS) {
       isExecuteStatementFailed = true;
+      isLogBeingGenerated = false;
       throw eS;
     } catch (Exception ex) {
       isExecuteStatementFailed = true;
+      isLogBeingGenerated = false;
       throw new SQLException(ex.toString(), "08S01", ex);
     }
   }
@@ -914,10 +916,6 @@ public class HiveStatement implements java.sql.Statement {
         if (isQueryClosed) {
           throw new ClosedOrCancelledStatementException("Method getQueryLog() 
failed. The " +
               "statement has been closed or cancelled.");
-        }
-        if (isExecuteStatementFailed) {
-          throw new SQLException("Method getQueryLog() failed. Because the 
stmtHandle in " +
-              "HiveStatement is null and the statement execution might fail.");
         } else {
           return logs;
         }

Reply via email to