Repository: hive
Updated Branches:
  refs/heads/master 1733a3712 -> ee2c814ec


HIVE-18642 : incorrect assertion in TezSessionPool for WM (Sergey Shelukhin, 
reviewed by Prasanth Jayachandran)


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

Branch: refs/heads/master
Commit: ee2c814ec7427579a6e74d30a719cbe424c32fe9
Parents: 1733a37
Author: sergey <[email protected]>
Authored: Wed Feb 7 12:09:02 2018 -0800
Committer: sergey <[email protected]>
Committed: Wed Feb 7 13:43:18 2018 -0800

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hive/ql/exec/tez/TezSessionPool.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/ee2c814e/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionPool.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionPool.java 
b/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionPool.java
index 92eb093..0962460 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionPool.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionPool.java
@@ -104,10 +104,12 @@ class TezSessionPool<SessionType extends 
TezSessionPoolSession> {
       amRegistry.populateCache(true);
     }
 
+    this.parentSessionState = SessionState.get();
+    if (initialSize == 0) return; // May be resized later.
+
     int threadCount = Math.min(initialSize,
         HiveConf.getIntVar(initConf, 
ConfVars.HIVE_SERVER2_TEZ_SESSION_MAX_INIT_THREADS));
     Preconditions.checkArgument(threadCount > 0);
-    this.parentSessionState = SessionState.get();
     if (threadCount == 1) {
       for (int i = 0; i < initialSize; ++i) {
         SessionType session = sessionObjFactory.create(null);

Reply via email to