hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zjs...@apache.org
Subject hadoop git commit: YARN-3751. Fixed AppInfo to check if used resources are null. Contributed by Sunil G.
Date Wed, 03 Jun 2015 18:53:49 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 539ff92c2 -> aaa567514


YARN-3751. Fixed AppInfo to check if used resources are null. Contributed by Sunil G.

(cherry picked from commit dbc4f64937ea2b4c941a3ac49afc4eeba3f5b763)


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

Branch: refs/heads/branch-2
Commit: aaa567514a03b7af1c6467aae63758b67ef0c0dd
Parents: 539ff92
Author: Zhijie Shen <zjshen@apache.org>
Authored: Wed Jun 3 11:51:41 2015 -0700
Committer: Zhijie Shen <zjshen@apache.org>
Committed: Wed Jun 3 11:52:39 2015 -0700

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                       |  3 +++
 .../apache/hadoop/yarn/server/webapp/dao/AppInfo.java | 14 ++++++++------
 2 files changed, 11 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/aaa56751/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index d5a4b0d..ee3a197 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -431,6 +431,9 @@ Release 2.8.0 - UNRELEASED
     YARN-3740. Fixed the typo in the configuration name:
     APPLICATION_HISTORY_PREFIX_MAX_APPS. (Xuan Gong via zjshen)
 
+    YARN-3751. Fixed AppInfo to check if used resources are null. (Sunil G via
+    zjshen)
+
 Release 2.7.1 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/aaa56751/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/dao/AppInfo.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/dao/AppInfo.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/dao/AppInfo.java
index 0cc5f75..8f332a4 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/dao/AppInfo.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/dao/AppInfo.java
@@ -86,12 +86,14 @@ public class AppInfo {
     elapsedTime = Times.elapsed(startedTime, finishedTime);
     finalAppStatus = app.getFinalApplicationStatus();
     if (app.getApplicationResourceUsageReport() != null) {
-      runningContainers =
-          app.getApplicationResourceUsageReport().getNumUsedContainers();
-      allocatedCpuVcores = app.getApplicationResourceUsageReport()
-          .getUsedResources().getVirtualCores();
-      allocatedMemoryMB = app.getApplicationResourceUsageReport()
-          .getUsedResources().getMemory();
+      runningContainers = app.getApplicationResourceUsageReport()
+          .getNumUsedContainers();
+      if (app.getApplicationResourceUsageReport().getUsedResources() != null) {
+        allocatedCpuVcores = app.getApplicationResourceUsageReport()
+            .getUsedResources().getVirtualCores();
+        allocatedMemoryMB = app.getApplicationResourceUsageReport()
+            .getUsedResources().getMemory();
+      }
     }
     progress = app.getProgress() * 100; // in percent
     if (app.getApplicationTags() != null && !app.getApplicationTags().isEmpty())
{


Mime
View raw message