hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject hadoop git commit: YARN-6802. Add max AM resource and AM resource usage to leaf queue view in FairScheduler WebUI. (YunFan Zhou via Yufei Gu)
Date Fri, 28 Jul 2017 16:53:18 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk f735ad1b6 -> 9ea01fd95


YARN-6802. Add max AM resource and AM resource usage to leaf queue view in FairScheduler WebUI.
(YunFan Zhou via Yufei Gu)


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

Branch: refs/heads/trunk
Commit: 9ea01fd956b7027fa28fbed07f57d0c9c460c283
Parents: f735ad1
Author: Yufei Gu <yufei@apache.org>
Authored: Fri Jul 28 09:51:06 2017 -0700
Committer: Yufei Gu <yufei@apache.org>
Committed: Fri Jul 28 09:52:53 2017 -0700

----------------------------------------------------------------------
 .../webapp/FairSchedulerPage.java               |  2 ++
 .../webapp/dao/FairSchedulerQueueInfo.java      | 23 ++++++++++++++++++++
 2 files changed, 25 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/9ea01fd9/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/FairSchedulerPage.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/FairSchedulerPage.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/FairSchedulerPage.java
index ffa4594..ef417d4 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/FairSchedulerPage.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/FairSchedulerPage.java
@@ -72,6 +72,8 @@ public class FairSchedulerPage extends RmView {
       ResponseInfo ri = info("\'" + qinfo.getQueueName() + "\' Queue Status").
           __("Used Resources:", qinfo.getUsedResources().toString()).
           __("Demand Resources:", qinfo.getDemandResources().toString()).
+          __("AM Used Resources:", qinfo.getAMUsedResources().toString()).
+          __("AM Max Resources:", qinfo.getAMMaxResources().toString()).
           __("Num Active Applications:", qinfo.getNumActiveApplications()).
           __("Num Pending Applications:", qinfo.getNumPendingApplications()).
           __("Min Resources:", qinfo.getMinResources().toString()).

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9ea01fd9/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/FairSchedulerQueueInfo.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/dao/FairSchedulerQueueInfo.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/FairSchedulerQueueInfo.java
index fa14bae..a4607c2 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/FairSchedulerQueueInfo.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/FairSchedulerQueueInfo.java
@@ -28,6 +28,7 @@ import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlSeeAlso;
 import javax.xml.bind.annotation.XmlTransient;
 
+import org.apache.hadoop.yarn.api.records.Resource;
 import org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.AllocationConfiguration;
 import org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FSLeafQueue;
 import org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FSQueue;
@@ -54,6 +55,8 @@ public class FairSchedulerQueueInfo {
   private ResourceInfo minResources;
   private ResourceInfo maxResources;
   private ResourceInfo usedResources;
+  private ResourceInfo amUsedResources;
+  private ResourceInfo amMaxResources;
   private ResourceInfo demandResources;
   private ResourceInfo steadyFairResources;
   private ResourceInfo fairResources;
@@ -82,6 +85,12 @@ public class FairSchedulerQueueInfo {
     
     clusterResources = new ResourceInfo(scheduler.getClusterResource());
     
+    amUsedResources = new ResourceInfo(Resource.newInstance(
+        queue.getMetrics().getAMResourceUsageMB(),
+        queue.getMetrics().getAMResourceUsageVCores()));
+    amMaxResources = new ResourceInfo(Resource.newInstance(
+        queue.getMetrics().getMaxAMShareMB(),
+        queue.getMetrics().getMaxAMShareVCores()));
     usedResources = new ResourceInfo(queue.getResourceUsage());
     demandResources = new ResourceInfo(queue.getDemand());
     fractionMemUsed = (float)usedResources.getMemorySize() /
@@ -205,6 +214,20 @@ public class FairSchedulerQueueInfo {
   }
 
   /**
+   * @return the am used resource of this queue.
+   */
+  public ResourceInfo getAMUsedResources() {
+    return amUsedResources;
+  }
+
+  /**
+   * @return the am max resource of this queue.
+   */
+  public ResourceInfo getAMMaxResources() {
+    return amMaxResources;
+  }
+
+  /**
    * @return the demand resource of this queue.
      */
   public ResourceInfo getDemandResources() {


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