YARN-4995. FairScheduler: Display per-queue demand on the scheduler page. (xupeng via kasha)
This commit is contained in:
parent
687233f20d
commit
4b4e4c6ba8
|
@ -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()).
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue