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 689622f0d4..d534ec7ef0 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 @@ static class LeafQueueBlock extends HtmlBlock { 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 e02df65638..5ab39e4a3a 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 FairSchedulerQueueInfo(FSQueue queue, FairScheduler scheduler) { 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 ResourceInfo getUsedResources() { 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.