You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by se...@apache.org on 2016/10/11 23:10:15 UTC
[20/22] hive git commit: HIVE-14690: Query fail when
hive.exec.parallel=true, with conflicting session dir (Daniel Dai,
reviewed by Thejas Nair)
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/hive-14535
Commit: 9feed2f61aeb91d34b8c4231ca1d6149d81c8a02
Parents: f4a857c
Author: Daniel Dai <da...@hortonworks.com>
Authored: Tue Oct 11 15:53:26 2016 -0700
Committer: Daniel Dai <da...@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);