hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r1586099 - in /hive/branches/branch-0.13: ./ ql/src/java/org/apache/hadoop/hive/ql/Driver.java
Date Wed, 09 Apr 2014 19:41:13 GMT
Author: omalley
Date: Wed Apr  9 19:41:13 2014
New Revision: 1586099

URL: http://svn.apache.org/r1586099
Log:
HIVE-6850. Fix fetch operator to use correct valid transaction list. (omalley)

Modified:
    hive/branches/branch-0.13/   (props changed)
    hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/Driver.java

Propchange: hive/branches/branch-0.13/
------------------------------------------------------------------------------
  Merged /hive/trunk:r1586097

Modified: hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/Driver.java?rev=1586099&r1=1586098&r2=1586099&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/Driver.java (original)
+++ hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/Driver.java Wed Apr  9
19:41:13 2014
@@ -119,10 +119,6 @@ public class Driver implements CommandPr
         throw new SemanticException(e.getMessage(), e);
       }
     }
-    // the reason that we set the txn manager for the cxt here is because each
-    // query has its own ctx object. The txn mgr is shared across the
-    // same instance of Driver, which can run multiple queries.
-    ctx.setHiveTxnManager(txnMgr);
   }
 
   private boolean checkConcurrency() throws SemanticException {
@@ -813,7 +809,7 @@ public class Driver implements CommandPr
   private int recordValidTxns() {
     try {
       ValidTxnList txns = txnMgr.getValidTxns();
-      ctx.getConf().set(ValidTxnList.VALID_TXNS_KEY, txns.toString());
+      conf.set(ValidTxnList.VALID_TXNS_KEY, txns.toString());
       return 0;
     } catch (LockException e) {
       errorMessage = "FAILED: Error in determing valid transactions: " + e.getMessage();
@@ -992,13 +988,6 @@ public class Driver implements CommandPr
     perfLogger.PerfLogBegin(CLASS_NAME, PerfLogger.TIME_TO_SUBMIT);
 
     int ret;
-    if (!alreadyCompiled) {
-      ret = compileInternal(command);
-      if (ret != 0) {
-        return new CommandProcessorResponse(ret, errorMessage, SQLState);
-      }
-    }
-
     boolean requireLock = false;
     boolean ckLock = false;
     try {
@@ -1013,6 +1002,20 @@ public class Driver implements CommandPr
       ret = 10;
       return new CommandProcessorResponse(ret, errorMessage, SQLState);
     }
+    ret = recordValidTxns();
+    if (ret != 0) return new CommandProcessorResponse(ret, errorMessage, SQLState);
+
+    if (!alreadyCompiled) {
+      ret = compileInternal(command);
+      if (ret != 0) {
+        return new CommandProcessorResponse(ret, errorMessage, SQLState);
+      }
+    }
+
+    // the reason that we set the txn manager for the cxt here is because each
+    // query has its own ctx object. The txn mgr is shared across the
+    // same instance of Driver, which can run multiple queries.
+    ctx.setHiveTxnManager(txnMgr);
 
     if (ckLock) {
       boolean lockOnlyMapred = HiveConf.getBoolVar(conf, HiveConf.ConfVars.HIVE_LOCK_MAPRED_ONLY);
@@ -1039,9 +1042,6 @@ public class Driver implements CommandPr
       }
     }
 
-    ret = recordValidTxns();
-    if (ret != 0) return new CommandProcessorResponse(ret, errorMessage, SQLState);
-
     if (requireLock) {
       ret = acquireReadWriteLocks();
       if (ret != 0) {



Mime
View raw message