HIVE-18492 : Wrong argument in the WorkloadManager.resetAndQueryKill() (Oleg 
Danilov, reviewed by Prasanth Jayachandran and Sergey Shelukhin)


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

Branch: refs/heads/master
Commit: 18779ea076ee1dfae0ed0628ce43efc046d7cf11
Parents: cb22580
Author: sergey <ser...@apache.org>
Authored: Mon Feb 12 11:58:07 2018 -0800
Committer: sergey <ser...@apache.org>
Committed: Mon Feb 12 11:58:07 2018 -0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hive/ql/exec/tez/WorkloadManager.java  | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/18779ea0/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/WorkloadManager.java
----------------------------------------------------------------------
diff --git 
a/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/WorkloadManager.java 
b/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/WorkloadManager.java
index 915b016..25922d9 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/WorkloadManager.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/WorkloadManager.java
@@ -2127,7 +2127,13 @@ public class WorkloadManager extends 
TezSessionPoolSession.AbstractTriggerValida
       PoolState poolState = pools.get(poolName);
       if (poolState != null) {
         poolState.getSessions().remove(toKill);
-        poolState.getInitializingSessions().remove(toKill);
+        Iterator<SessionInitContext> iter = 
poolState.getInitializingSessions().iterator();
+        while (iter.hasNext()) {
+          if (iter.next().session == toKill) {
+            iter.remove();
+            break;
+          }
+        }
       }
     }
 

Reply via email to