hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From epa...@apache.org
Subject hadoop git commit: YARN-7249. Fix CapacityScheduler NPE issue when a container preempted while the node is being removed. Contributed by Wangda Tan.
Date Tue, 26 Sep 2017 15:32:03 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.8.2 d2e2b60ec -> 76e053a91


YARN-7249. Fix CapacityScheduler NPE issue when a container preempted while the node is being
removed. Contributed by Wangda Tan.

(cherry picked from commit f794adde3bb3488d876ebc8de3796956de503e0d)


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

Branch: refs/heads/branch-2.8.2
Commit: 76e053a91061fca5c602b77bcac2445fa6f9c2cd
Parents: d2e2b60
Author: Eric Payne <epayne@apache.org>
Authored: Tue Sep 26 09:07:04 2017 -0500
Committer: Eric Payne <epayne@apache.org>
Committed: Tue Sep 26 10:26:00 2017 -0500

----------------------------------------------------------------------
 .../resourcemanager/scheduler/capacity/CapacityScheduler.java  | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/76e053a9/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.java
index f0413be..95323db 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.java
@@ -1585,6 +1585,12 @@ public class CapacityScheduler extends
     
     // Get the node on which the container was allocated
     FiCaSchedulerNode node = getNode(container.getNodeId());
+    if (node == null) {
+      LOG.info("Container=" + container + " of application=" + appId
+          + " completed with event=" + event + " on a node=" + container
+          .getNodeId() + ". However the node might be already removed by RM.");
+      return;
+    }
     
     // Inform the queue
     LeafQueue queue = (LeafQueue)application.getQueue();


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message