hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vvasu...@apache.org
Subject [24/50] [abbrv] hadoop git commit: YARN-4033. In FairScheduler, parent queues should also display queue status. (Siqi Li via kasha)
Date Wed, 16 Nov 2016 13:46:35 GMT
YARN-4033. In FairScheduler, parent queues should also display queue status. (Siqi Li via kasha)


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

Branch: refs/heads/YARN-3926
Commit: 79448d4ab1f298e50565b161e6605d994ee5e058
Parents: 96f4392
Author: Karthik Kambatla <kasha@cloudera.com>
Authored: Sun Nov 13 21:38:36 2016 -0800
Committer: Karthik Kambatla <kasha@cloudera.com>
Committed: Sun Nov 13 21:38:36 2016 -0800

----------------------------------------------------------------------
 .../webapp/FairSchedulerPage.java               | 28 ++++++++++++++++++++
 1 file changed, 28 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/79448d4a/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 d534ec7..544275e 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
@@ -90,6 +90,33 @@ public class FairSchedulerPage extends RmView {
     }
   }
   
+  static class ParentQueueBlock extends HtmlBlock {
+	    final FairSchedulerQueueInfo qinfo;
+
+    @Inject ParentQueueBlock(ViewContext ctx, FSQInfo info) {
+      super(ctx);
+      qinfo = (FairSchedulerQueueInfo)info.qinfo;
+    }
+
+    @Override
+    protected void render(Block html) {
+      ResponseInfo ri = info("\'" + qinfo.getQueueName() + "\' Queue Status").
+          _("Used Resources:", qinfo.getUsedResources().toString()).
+          _("Min Resources:", qinfo.getMinResources().toString()).
+          _("Max Resources:", qinfo.getMaxResources().toString());
+      int maxApps = qinfo.getMaxApplications();
+      if (maxApps < Integer.MAX_VALUE) {
+          ri._("Max Running Applications:", qinfo.getMaxApplications());
+      }
+      ri._(STEADY_FAIR_SHARE + ":", qinfo.getSteadyFairShare().toString());
+      ri._(INSTANTANEOUS_FAIR_SHARE + ":", qinfo.getFairShare().toString());
+      html._(InfoBlock.class);
+
+      // clear the info contents so this queue's info doesn't accumulate into another queue's
info
+      ri.clear();
+    }
+  }
+
   static class QueueBlock extends HtmlBlock {
     final FSQInfo fsqinfo;
 
@@ -127,6 +154,7 @@ public class FairSchedulerPage extends RmView {
         if (info instanceof FairSchedulerLeafQueueInfo) {
           li.ul("#lq").li()._(LeafQueueBlock.class)._()._();
         } else {
+          li.ul("#lq").li()._(ParentQueueBlock.class)._()._();
           li._(QueueBlock.class);
         }
         li._();


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