YARN-4995. FairScheduler: Display per-queue demand on the scheduler page. (xupeng via kasha)

This commit is contained in:
Karthik Kambatla 2016-05-11 17:36:21 -07:00
parent 687233f20d
commit 4b4e4c6ba8
2 changed files with 10 additions and 0 deletions

View File

@ -71,6 +71,7 @@ public class FairSchedulerPage extends RmView {
protected void render(Block html) { protected void render(Block html) {
ResponseInfo ri = info("\'" + qinfo.getQueueName() + "\' Queue Status"). ResponseInfo ri = info("\'" + qinfo.getQueueName() + "\' Queue Status").
_("Used Resources:", qinfo.getUsedResources().toString()). _("Used Resources:", qinfo.getUsedResources().toString()).
_("Demand Resources:", qinfo.getDemandResources().toString()).
_("Num Active Applications:", qinfo.getNumActiveApplications()). _("Num Active Applications:", qinfo.getNumActiveApplications()).
_("Num Pending Applications:", qinfo.getNumPendingApplications()). _("Num Pending Applications:", qinfo.getNumPendingApplications()).
_("Min Resources:", qinfo.getMinResources().toString()). _("Min Resources:", qinfo.getMinResources().toString()).

View File

@ -54,6 +54,7 @@ public class FairSchedulerQueueInfo {
private ResourceInfo minResources; private ResourceInfo minResources;
private ResourceInfo maxResources; private ResourceInfo maxResources;
private ResourceInfo usedResources; private ResourceInfo usedResources;
private ResourceInfo demandResources;
private ResourceInfo steadyFairResources; private ResourceInfo steadyFairResources;
private ResourceInfo fairResources; private ResourceInfo fairResources;
private ResourceInfo clusterResources; private ResourceInfo clusterResources;
@ -81,6 +82,7 @@ public class FairSchedulerQueueInfo {
clusterResources = new ResourceInfo(scheduler.getClusterResource()); clusterResources = new ResourceInfo(scheduler.getClusterResource());
usedResources = new ResourceInfo(queue.getResourceUsage()); usedResources = new ResourceInfo(queue.getResourceUsage());
demandResources = new ResourceInfo(queue.getDemand());
fractionMemUsed = (float)usedResources.getMemory() / fractionMemUsed = (float)usedResources.getMemory() /
clusterResources.getMemory(); clusterResources.getMemory();
@ -196,6 +198,13 @@ public class FairSchedulerQueueInfo {
return usedResources; 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 * Returns the queue's min share in as a fraction of the entire
* cluster capacity. * cluster capacity.