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 689622f0d44..d534ec7ef08 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 @@ -71,6 +71,7 @@ public class FairSchedulerPage extends RmView { protected void render(Block html) { ResponseInfo ri = info("\'" + qinfo.getQueueName() + "\' Queue Status"). _("Used Resources:", qinfo.getUsedResources().toString()). + _("Demand Resources:", qinfo.getDemandResources().toString()). _("Num Active Applications:", qinfo.getNumActiveApplications()). _("Num Pending Applications:", qinfo.getNumPendingApplications()). _("Min Resources:", qinfo.getMinResources().toString()). 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 e02df65638f..5ab39e4a3a4 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 @@ -54,6 +54,7 @@ public class FairSchedulerQueueInfo { private ResourceInfo minResources; private ResourceInfo maxResources; private ResourceInfo usedResources; + private ResourceInfo demandResources; private ResourceInfo steadyFairResources; private ResourceInfo fairResources; private ResourceInfo clusterResources; @@ -81,6 +82,7 @@ public class FairSchedulerQueueInfo { clusterResources = new ResourceInfo(scheduler.getClusterResource()); usedResources = new ResourceInfo(queue.getResourceUsage()); + demandResources = new ResourceInfo(queue.getDemand()); fractionMemUsed = (float)usedResources.getMemory() / clusterResources.getMemory(); @@ -196,6 +198,13 @@ public class FairSchedulerQueueInfo { return usedResources; } + /** + * @return the demand resource of this queue. + */ + public ResourceInfo getDemandResources() { + return demandResources; + } + /** * Returns the queue's min share in as a fraction of the entire * cluster capacity.