hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ka...@apache.org
Subject hadoop git commit: YARN-3467. Expose allocatedMB, allocatedVCores, and runningContainers metrics on running Applications in RM Web UI. (Anubhav Dhoot via kasha)
Date Sat, 30 May 2015 20:42:20 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 68cddb894 -> 6c80e599d


YARN-3467. Expose allocatedMB, allocatedVCores, and runningContainers metrics on running Applications
in RM Web UI. (Anubhav Dhoot via kasha)

(cherry picked from commit a8acdd65b3f0e8633050a1100136fd5e02ebdcfa)


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

Branch: refs/heads/branch-2
Commit: 6c80e599d1f158d429a5f3ed707c6326837a8835
Parents: 68cddb8
Author: Karthik Kambatla <kasha@apache.org>
Authored: Sat May 30 13:36:24 2015 -0700
Committer: Karthik Kambatla <kasha@apache.org>
Committed: Sat May 30 13:36:49 2015 -0700

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                       |  3 +++
 .../hadoop/yarn/server/webapp/WebPageUtils.java       |  4 ++--
 .../apache/hadoop/yarn/server/webapp/dao/AppInfo.java | 14 ++++++++++++++
 .../webapp/FairSchedulerAppsBlock.java                |  6 ++++++
 .../server/resourcemanager/webapp/RMAppsBlock.java    |  8 ++++++++
 5 files changed, 33 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/6c80e599/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 09984bf..d20dcf5 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -235,6 +235,9 @@ Release 2.8.0 - UNRELEASED
     YARN-3713. Remove duplicate function call storeContainerDiagnostics in
     ContainerDiagnosticsUpdateTransition (zxu via rkanter)
 
+    YARN-3467. Expose allocatedMB, allocatedVCores, and runningContainers metrics on 
+    running Applications in RM Web UI. (Anubhav Dhoot via kasha)
+
   OPTIMIZATIONS
 
     YARN-3339. TestDockerContainerExecutor should pull a single image and not

http://git-wip-us.apache.org/repos/asf/hadoop/blob/6c80e599/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/WebPageUtils.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/WebPageUtils.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/WebPageUtils.java
index 6ca5011..ed0fe38 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/WebPageUtils.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/WebPageUtils.java
@@ -52,9 +52,9 @@ public class WebPageUtils {
       .append(", 'mRender': renderHadoopDate }")
       .append("\n, {'sType':'numeric', bSearchable:false, 'aTargets':");
     if (isFairSchedulerPage) {
-      sb.append("[11]");
+      sb.append("[13]");
     } else if (isResourceManager) {
-      sb.append("[10]");
+      sb.append("[12]");
     } else {
       sb.append("[9]");
     }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/6c80e599/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 5d9ba6f..0cc5f75 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
@@ -58,6 +58,8 @@ public class AppInfo {
   protected long finishedTime;
   protected long elapsedTime;
   protected String applicationTags;
+  private int allocatedCpuVcores;
+  private int allocatedMemoryMB;
 
   public AppInfo() {
     // JAXB needs this
@@ -86,6 +88,10 @@ public class AppInfo {
     if (app.getApplicationResourceUsageReport() != null) {
       runningContainers =
           app.getApplicationResourceUsageReport().getNumUsedContainers();
+      allocatedCpuVcores = app.getApplicationResourceUsageReport()
+          .getUsedResources().getVirtualCores();
+      allocatedMemoryMB = app.getApplicationResourceUsageReport()
+          .getUsedResources().getMemory();
     }
     progress = app.getProgress() * 100; // in percent
     if (app.getApplicationTags() != null && !app.getApplicationTags().isEmpty())
{
@@ -133,6 +139,14 @@ public class AppInfo {
     return runningContainers;
   }
 
+  public int getAllocatedCpuVcores() {
+    return allocatedCpuVcores;
+  }
+
+  public int getAllocatedMemoryMB() {
+    return allocatedMemoryMB;
+  }
+
   public float getProgress() {
     return progress;
   }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/6c80e599/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/FairSchedulerAppsBlock.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/FairSchedulerAppsBlock.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/FairSchedulerAppsBlock.java
index 80099d0..f257656 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/FairSchedulerAppsBlock.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/FairSchedulerAppsBlock.java
@@ -93,6 +93,8 @@ public class FairSchedulerAppsBlock extends HtmlBlock {
             th(".state", "State").
             th(".finalstatus", "FinalStatus").
             th(".runningcontainer", "Running Containers").
+            th(".allocatedCpu", "Allocated CPU VCores").
+            th(".allocatedMemory", "Allocated Memory MB").
             th(".progress", "Progress").
             th(".ui", "Tracking UI")._()._().
         tbody();
@@ -136,6 +138,10 @@ public class FairSchedulerAppsBlock extends HtmlBlock {
       .append(appInfo.getFinalStatus()).append("\",\"")
       .append(appInfo.getRunningContainers() == -1 ? "N/A" : String
          .valueOf(appInfo.getRunningContainers())).append("\",\"")
+      .append(appInfo.getAllocatedVCores() == -1 ? "N/A" : String
+        .valueOf(appInfo.getAllocatedVCores())).append("\",\"")
+      .append(appInfo.getAllocatedMB() == -1 ? "N/A" : String
+        .valueOf(appInfo.getAllocatedMB())).append("\",\"")
       // Progress bar
       .append("<br title='").append(percent)
       .append("'> <div class='").append(C_PROGRESSBAR).append("' title='")

http://git-wip-us.apache.org/repos/asf/hadoop/blob/6c80e599/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 1d97bef..d252c30 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
@@ -60,6 +60,8 @@ public class RMAppsBlock extends AppsBlock {
           .th(".finishtime", "FinishTime").th(".state", "State")
           .th(".finalstatus", "FinalStatus")
           .th(".runningcontainer", "Running Containers")
+          .th(".allocatedCpu", "Allocated CPU VCores")
+          .th(".allocatedMemory", "Allocated Memory MB")
           .th(".progress", "Progress")
           .th(".ui", "Tracking UI").th(".blacklisted", "Blacklisted Nodes")._()
           ._().tbody();
@@ -114,6 +116,12 @@ public class RMAppsBlock extends AppsBlock {
         .append(app.getRunningContainers() == -1 ? "N/A" : String
             .valueOf(app.getRunningContainers()))
         .append("\",\"")
+        .append(app.getAllocatedCpuVcores() == -1 ? "N/A" : String
+            .valueOf(app.getAllocatedCpuVcores()))
+        .append("\",\"")
+        .append(app.getAllocatedMemoryMB() == -1 ? "N/A" : String
+            .valueOf(app.getAllocatedMemoryMB()))
+        .append("\",\"")
         // Progress bar
         .append("<br title='").append(percent).append("'> <div class='")
         .append(C_PROGRESSBAR).append("' title='").append(join(percent, '%'))


Mime
View raw message