Package org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair

Examples of org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.QueueManager


 
  public FairSchedulerQueueInfo() {
  }
 
  public FairSchedulerQueueInfo(FSQueue queue, FairScheduler scheduler) {
    QueueManager manager = scheduler.getQueueManager();
   
    queueName = queue.getName();
    schedulingPolicy = queue.getPolicy().getName();
   
    clusterResources = new ResourceInfo(scheduler.getClusterCapacity());
   
    usedResources = new ResourceInfo(queue.getResourceUsage());
    fractionMemUsed = (float)usedResources.getMemory() /
        clusterResources.getMemory();
   
    fairResources = new ResourceInfo(queue.getFairShare());
    minResources = new ResourceInfo(queue.getMinShare());
    maxResources = new ResourceInfo(queue.getMaxShare());
    maxResources = new ResourceInfo(
        Resources.componentwiseMin(queue.getMaxShare(),
            scheduler.getClusterCapacity()));
   
    fractionMemFairShare = (float)fairResources.getMemory() / clusterResources.getMemory();
    fractionMemMinShare = (float)minResources.getMemory() / clusterResources.getMemory();
    fractionMemMaxShare = (float)maxResources.getMemory() / clusterResources.getMemory();
   
    maxApps = manager.getQueueMaxApps(queueName);
   
    Collection<FSQueue> children = queue.getChildQueues();
    childQueues = new ArrayList<FairSchedulerQueueInfo>();
    for (FSQueue child : children) {
      if (child instanceof FSLeafQueue) {
View Full Code Here


  private String queueName;
 
  private Collection<FairSchedulerQueueInfo> childInfos;
 
  public FairSchedulerQueueInfo(FSQueue queue, FairScheduler scheduler) {
    QueueManager manager = scheduler.getQueueManager();
   
    queueName = queue.getName();
       
    clusterResources = scheduler.getClusterCapacity();
   
    usedResources = queue.getResourceUsage();
    fractionMemUsed = (float)usedResources.getMemory() /
        clusterResources.getMemory();
   
    fairResources = queue.getFairShare();
    minResources = queue.getMinShare();
    maxResources = queue.getMaxShare();
    maxResources = Resources.componentwiseMin(maxResources, clusterResources);
   
    fractionMemFairShare = (float)fairResources.getMemory() / clusterResources.getMemory();
    fractionMemMinShare = (float)minResources.getMemory() / clusterResources.getMemory();
    fractionMemMaxShare = (float)maxResources.getMemory() / clusterResources.getMemory();
   
    maxApps = manager.getQueueMaxApps(queueName);
   
    Collection<FSQueue> childQueues = queue.getChildQueues();
    childInfos = new ArrayList<FairSchedulerQueueInfo>();
    for (FSQueue child : childQueues) {
      if (child instanceof FSLeafQueue) {
View Full Code Here

  private String queueName;
 
  private Collection<FairSchedulerQueueInfo> childInfos;
 
  public FairSchedulerQueueInfo(FSQueue queue, FairScheduler scheduler) {
    QueueManager manager = scheduler.getQueueManager();
   
    queueName = queue.getName();
       
    Resource clusterMax = scheduler.getClusterCapacity();
    clusterMaxMem = clusterMax.getMemory();
   
    usedResources = queue.getResourceUsage();
    fractionUsed = (float)usedResources.getMemory() / clusterMaxMem;
   
    fairShare = queue.getFairShare().getMemory();
    minResources = queue.getMinShare();
    minShare = minResources.getMemory();
    maxResources = scheduler.getQueueManager().getMaxResources(queueName);
    if (maxResources.getMemory() > clusterMaxMem) {
      maxResources = Resources.createResource(clusterMaxMem);
    }
    maxShare = maxResources.getMemory();
   
    fractionFairShare = (float)fairShare / clusterMaxMem;
    fractionMinShare = (float)minShare / clusterMaxMem;
   
    maxApps = manager.getQueueMaxApps(queueName);
   
    Collection<FSQueue> childQueues = queue.getChildQueues();
    childInfos = new ArrayList<FairSchedulerQueueInfo>();
    for (FSQueue child : childQueues) {
      if (child instanceof FSLeafQueue) {
View Full Code Here

TOP

Related Classes of org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.QueueManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.