hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rohithsharm...@apache.org
Subject hadoop git commit: YARN-4763. RMApps Page crashes with NPE. (Bibin A Chundatt via rohithsharmaks)
Date Sat, 05 Mar 2016 07:35:25 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk c50aad0f8 -> 19ee18590


YARN-4763. RMApps Page crashes with NPE. (Bibin A Chundatt via rohithsharmaks)


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

Branch: refs/heads/trunk
Commit: 19ee1859071509bba9ecd0a8a7dc6a47e2979c88
Parents: c50aad0
Author: Rohith Sharma K S <rohithsharmaks@apache.org>
Authored: Sat Mar 5 12:38:15 2016 +0530
Committer: Rohith Sharma K S <rohithsharmaks@apache.org>
Committed: Sat Mar 5 13:02:57 2016 +0530

----------------------------------------------------------------------
 .../yarn/server/resourcemanager/webapp/RMAppsBlock.java     | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/19ee1859/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppsBlock.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/webapp/RMAppsBlock.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppsBlock.java
index 24a40c1..b4d7921 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppsBlock.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppsBlock.java
@@ -31,6 +31,7 @@ import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
 import org.apache.hadoop.yarn.api.records.ApplicationReport;
 import org.apache.hadoop.yarn.api.records.YarnApplicationState;
 import org.apache.hadoop.yarn.server.resourcemanager.ResourceManager;
+import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt;
 import org.apache.hadoop.yarn.server.webapp.AppsBlock;
 import org.apache.hadoop.yarn.server.webapp.dao.AppInfo;
 import org.apache.hadoop.yarn.util.ConverterUtils;
@@ -95,9 +96,11 @@ public class RMAppsBlock extends AppsBlock {
       }
 
       String blacklistedNodesCount = "N/A";
-      Set<String> nodes = rm.getRMContext().getRMApps()
-          .get(appAttemptId.getApplicationId()).getAppAttempts()
-          .get(appAttemptId).getBlacklistedNodes();
+      RMAppAttempt appAttempt =
+          rm.getRMContext().getRMApps().get(appAttemptId.getApplicationId())
+              .getAppAttempts().get(appAttemptId);
+      Set<String> nodes =
+          null == appAttempt ? null : appAttempt.getBlacklistedNodes();
       if (nodes != null) {
         blacklistedNodesCount = String.valueOf(nodes.size());
       }


Mime
View raw message