hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject hadoop git commit: YARN-8025. UsersManangers#getComputedResourceLimitForActiveUsers throws NPE due to preComputedActiveUserLimit is empty. Contributed by Tao Yang.
Date Mon, 07 May 2018 05:56:31 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-3.1 864640c1e -> 68dd01efc


YARN-8025. UsersManangers#getComputedResourceLimitForActiveUsers throws NPE due to preComputedActiveUserLimit
is empty. Contributed by Tao Yang.

(Cherry picked from commit 67f239c42f676237290d18ddbbc9aec369267692)


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

Branch: refs/heads/branch-3.1
Commit: 68dd01efc14349ef58533cf000115bc23795399a
Parents: 864640c
Author: Weiwei Yang <wwei@apache.org>
Authored: Mon May 7 11:33:14 2018 +0800
Committer: Weiwei Yang <wwei@apache.org>
Committed: Mon May 7 11:41:01 2018 +0800

----------------------------------------------------------------------
 .../resourcemanager/scheduler/capacity/UsersManager.java    | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/68dd01ef/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/UsersManager.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/UsersManager.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/UsersManager.java
index 7287c5b..747a488 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/UsersManager.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/UsersManager.java
@@ -490,11 +490,12 @@ public class UsersManager implements AbstractUsersManager {
       Resource clusterResource, String nodePartition,
       SchedulingMode schedulingMode) {
 
-    Map<SchedulingMode, Resource> userLimitPerSchedulingMode = preComputedActiveUserLimit
-        .get(nodePartition);
+    Map<SchedulingMode, Resource> userLimitPerSchedulingMode;
 
     try {
       writeLock.lock();
+      userLimitPerSchedulingMode =
+          preComputedActiveUserLimit.get(nodePartition);
       if (isRecomputeNeeded(schedulingMode, nodePartition, true)) {
         // recompute
         userLimitPerSchedulingMode = reComputeUserLimits(userName,
@@ -548,11 +549,11 @@ public class UsersManager implements AbstractUsersManager {
       Resource clusterResource, String nodePartition,
       SchedulingMode schedulingMode) {
 
-    Map<SchedulingMode, Resource> userLimitPerSchedulingMode = preComputedAllUserLimit
-        .get(nodePartition);
+    Map<SchedulingMode, Resource> userLimitPerSchedulingMode;
 
     try {
       writeLock.lock();
+      userLimitPerSchedulingMode = preComputedAllUserLimit.get(nodePartition);
       if (isRecomputeNeeded(schedulingMode, nodePartition, false)) {
         // recompute
         userLimitPerSchedulingMode = reComputeUserLimits(userName,


---------------------------------------------------------------------
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