hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject hive git commit: HIVE-14690: Query fail when hive.exec.parallel=true, with conflicting session dir (Daniel Dai, reviewed by Thejas Nair)
Date Tue, 11 Oct 2016 22:53:42 GMT
Repository: hive
Updated Branches:
  refs/heads/master f4a857ca1 -> 9feed2f61


HIVE-14690: Query fail when hive.exec.parallel=true, with conflicting session dir (Daniel
Dai, reviewed by Thejas Nair)


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

Branch: refs/heads/master
Commit: 9feed2f61aeb91d34b8c4231ca1d6149d81c8a02
Parents: f4a857c
Author: Daniel Dai <daijy@hortonworks.com>
Authored: Tue Oct 11 15:53:26 2016 -0700
Committer: Daniel Dai <daijy@hortonworks.com>
Committed: Tue Oct 11 15:53:26 2016 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hive/ql/session/SessionState.java  | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/9feed2f6/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java b/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java
index d23a51f..71aea3a 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java
@@ -144,6 +144,10 @@ public class SessionState {
    */
   private boolean isUsingThriftJDBCBinarySerDe = false;
 
+  /**
+   * The flag to indicate if the session already started so we can skip the init
+   */
+  private boolean isStarted = false;
   /*
    * HiveHistory Object
    */
@@ -547,9 +551,14 @@ public class SessionState {
     startSs.tezSessionState.endOpen();
   }
 
-  private static void start(SessionState startSs, boolean isAsync, LogHelper console) {
+  synchronized private static void start(SessionState startSs, boolean isAsync, LogHelper
console) {
     setCurrentSessionState(startSs);
 
+    if (startSs.isStarted) {
+      return;
+    }
+    startSs.isStarted = true;
+
     if (startSs.hiveHist == null){
       if (startSs.getConf().getBoolVar(HiveConf.ConfVars.HIVE_SESSION_HISTORY_ENABLED)) {
         startSs.hiveHist = new HiveHistoryImpl(startSs);


Mime
View raw message