当前位置: 首页>>代码示例>>Java>>正文


Java CSQueue.getUsedCapacity方法代码示例

本文整理汇总了Java中org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue.getUsedCapacity方法的典型用法代码示例。如果您正苦于以下问题:Java CSQueue.getUsedCapacity方法的具体用法?Java CSQueue.getUsedCapacity怎么用?Java CSQueue.getUsedCapacity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue的用法示例。


在下文中一共展示了CSQueue.getUsedCapacity方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: CapacitySchedulerQueueInfo

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue; //导入方法依赖的package包/类
CapacitySchedulerQueueInfo(CSQueue q) {
  queuePath = q.getQueuePath();
  capacity = q.getCapacity() * 100;
  usedCapacity = q.getUsedCapacity() * 100;

  maxCapacity = q.getMaximumCapacity();
  if (maxCapacity < EPSILON || maxCapacity > 1f)
    maxCapacity = 1f;
  maxCapacity *= 100;

  absoluteCapacity = cap(q.getAbsoluteCapacity(), 0f, 1f) * 100;
  absoluteMaxCapacity = cap(q.getAbsoluteMaximumCapacity(), 0f, 1f) * 100;
  absoluteUsedCapacity = cap(q.getAbsoluteUsedCapacity(), 0f, 1f) * 100;
  numApplications = q.getNumApplications();
  usedResources = q.getUsedResources().toString();
  queueName = q.getQueueName();
  state = q.getState();
  resourcesUsed = new ResourceInfo(q.getUsedResources());
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:20,代码来源:CapacitySchedulerQueueInfo.java

示例2: CapacitySchedulerQueueInfo

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue; //导入方法依赖的package包/类
CapacitySchedulerQueueInfo(CSQueue q) {
  queuePath = q.getQueuePath();
  capacity = q.getCapacity() * 100;
  usedCapacity = q.getUsedCapacity() * 100;

  maxCapacity = q.getMaximumCapacity();
  if (maxCapacity < EPSILON || maxCapacity > 1f)
    maxCapacity = 1f;
  maxCapacity *= 100;

  absoluteCapacity = cap(q.getAbsoluteCapacity(), 0f, 1f) * 100;
  absoluteMaxCapacity = cap(q.getAbsoluteMaximumCapacity(), 0f, 1f) * 100;
  absoluteUsedCapacity = cap(q.getAbsoluteUsedCapacity(), 0f, 1f) * 100;
  numApplications = q.getNumApplications();
  queueName = q.getQueueName();
  state = q.getState();
  resourcesUsed = new ResourceInfo(q.getUsedResources());
}
 
开发者ID:Seagate,项目名称:hadoop-on-lustre2,代码行数:19,代码来源:CapacitySchedulerQueueInfo.java

示例3: CapacitySchedulerQueueInfo

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue; //导入方法依赖的package包/类
CapacitySchedulerQueueInfo(CSQueue q, String nodeLabel) {
  QueueCapacities qCapacities = q.getQueueCapacities();
  ResourceUsage queueResourceUsage = q.getQueueResourceUsage();

  queuePath = q.getQueuePath();
  capacity = qCapacities.getCapacity(nodeLabel) * 100;
  usedCapacity = q.getUsedCapacity(nodeLabel) * 100;

  maxCapacity = qCapacities.getMaximumCapacity(nodeLabel);
  if (maxCapacity < EPSILON || maxCapacity > 1f)
    maxCapacity = 1f;
  maxCapacity *= 100;

  absoluteCapacity =
      cap(qCapacities.getAbsoluteCapacity(nodeLabel), 0f, 1f) * 100;
  absoluteMaxCapacity =
      cap(qCapacities.getAbsoluteMaximumCapacity(nodeLabel), 0f, 1f) * 100;
  absoluteUsedCapacity = q.getAbsoluteUsedCapacity(nodeLabel) * 100;
  numApplications = q.getNumApplications();
  queueName = q.getQueueName();
  state = q.getState();
  resourcesUsed = new ResourceInfo(queueResourceUsage.getUsed(nodeLabel));
  if (q instanceof PlanQueue && !((PlanQueue) q).showReservationsAsQueues()) {
    hideReservationQueues = true;
  }
  
  // add labels
  Set<String> labelSet = q.getAccessibleNodeLabels();
  if (labelSet != null) {
    nodeLabels.addAll(labelSet);
    Collections.sort(nodeLabels);
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:34,代码来源:CapacitySchedulerQueueInfo.java

示例4: CapacitySchedulerInfo

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue; //导入方法依赖的package包/类
public CapacitySchedulerInfo(CSQueue parent, NodeLabel nodeLabel) {
  this.queueName = parent.getQueueName();
  this.usedCapacity = parent.getUsedCapacity() * 100;
  this.capacity = parent.getCapacity() * 100;
  float max = parent.getMaximumCapacity();
  if (max < EPSILON || max > 1f)
    max = 1f;
  this.maxCapacity = max * 100;

  queues = getQueues(parent, nodeLabel);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:12,代码来源:CapacitySchedulerInfo.java

示例5: CapacitySchedulerQueueInfo

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue; //导入方法依赖的package包/类
CapacitySchedulerQueueInfo(CSQueue q) {

    queuePath = q.getQueuePath();
    capacity = q.getCapacity() * 100;
    usedCapacity = q.getUsedCapacity() * 100;

    maxCapacity = q.getMaximumCapacity();
    if (maxCapacity < EPSILON || maxCapacity > 1f)
      maxCapacity = 1f;
    maxCapacity *= 100;

    absoluteCapacity =
        cap(q.getAbsoluteCapacity(), 0f, 1f) * 100;
    absoluteMaxCapacity =
        cap(q.getAbsoluteMaximumCapacity(), 0f, 1f) * 100;
    absoluteUsedCapacity =
        cap(q.getAbsoluteUsedCapacity(), 0f, 1f) * 100;
    numApplications = q.getNumApplications();
    allocatedContainers = q.getMetrics().getAllocatedContainers();
    pendingContainers = q.getMetrics().getPendingContainers();
    reservedContainers = q.getMetrics().getReservedContainers();
    queueName = q.getQueueName();
    state = q.getState();
    resourcesUsed = new ResourceInfo(q.getUsedResources());
    if (q instanceof PlanQueue && !((PlanQueue) q).showReservationsAsQueues()) {
      hideReservationQueues = true;
    }

    // add labels
    Set<String> labelSet = q.getAccessibleNodeLabels();
    if (labelSet != null) {
      nodeLabels.addAll(labelSet);
      Collections.sort(nodeLabels);
    }
    QueueCapacities qCapacities = q.getQueueCapacities();
    capacities = new QueueCapacitiesInfo(qCapacities);

    ResourceUsage queueResourceUsage = q.getQueueResourceUsage();
    populateQueueResourceUsage(queueResourceUsage);
  }
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:41,代码来源:CapacitySchedulerQueueInfo.java

示例6: CapacitySchedulerInfo

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue; //导入方法依赖的package包/类
public CapacitySchedulerInfo(CSQueue parent, CapacityScheduler cs) {
  this.queueName = parent.getQueueName();
  this.usedCapacity = parent.getUsedCapacity() * 100;
  this.capacity = parent.getCapacity() * 100;
  float max = parent.getMaximumCapacity();
  if (max < EPSILON || max > 1f)
    max = 1f;
  this.maxCapacity = max * 100;

  capacities = new QueueCapacitiesInfo(parent.getQueueCapacities());
  queues = getQueues(parent);
  health = new CapacitySchedulerHealthInfo(cs);
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:14,代码来源:CapacitySchedulerInfo.java

示例7: CapacitySchedulerQueueInfo

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue; //导入方法依赖的package包/类
CapacitySchedulerQueueInfo(CSQueue q) {
  queuePath = q.getQueuePath();
  capacity = q.getCapacity() * 100;
  usedCapacity = q.getUsedCapacity() * 100;

  maxCapacity = q.getMaximumCapacity();
  if (maxCapacity < EPSILON || maxCapacity > 1f)
    maxCapacity = 1f;
  maxCapacity *= 100;

  absoluteCapacity = cap(q.getAbsoluteCapacity(), 0f, 1f) * 100;
  absoluteMaxCapacity = cap(q.getAbsoluteMaximumCapacity(), 0f, 1f) * 100;
  absoluteUsedCapacity = cap(q.getAbsoluteUsedCapacity(), 0f, 1f) * 100;
  numApplications = q.getNumApplications();
  queueName = q.getQueueName();
  state = q.getState();
  resourcesUsed = new ResourceInfo(q.getUsedResources());
  if(q instanceof PlanQueue &&
     !((PlanQueue)q).showReservationsAsQueues()) {
    hideReservationQueues = true;
  }
  
  // add labels
  Set<String> labelSet = q.getAccessibleNodeLabels();
  if (labelSet != null) {
    nodeLabels.addAll(labelSet);
    Collections.sort(nodeLabels);
  }
}
 
开发者ID:yncxcw,项目名称:big-c,代码行数:30,代码来源:CapacitySchedulerQueueInfo.java

示例8: CapacitySchedulerInfo

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue; //导入方法依赖的package包/类
public CapacitySchedulerInfo(CSQueue parent) {
  this.queueName = parent.getQueueName();
  this.usedCapacity = parent.getUsedCapacity() * 100;
  this.capacity = parent.getCapacity() * 100;
  float max = parent.getMaximumCapacity();
  if (max < EPSILON || max > 1f)
    max = 1f;
  this.maxCapacity = max * 100;

  queues = getQueues(parent);
}
 
开发者ID:yncxcw,项目名称:big-c,代码行数:12,代码来源:CapacitySchedulerInfo.java

示例9: CapacitySchedulerQueueInfo

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue; //导入方法依赖的package包/类
CapacitySchedulerQueueInfo(CSQueue q) {

    queuePath = q.getQueuePath();
    capacity = q.getCapacity() * 100;
    usedCapacity = q.getUsedCapacity() * 100;

    maxCapacity = q.getMaximumCapacity();
    if (maxCapacity < EPSILON || maxCapacity > 1f)
      maxCapacity = 1f;
    maxCapacity *= 100;

    absoluteCapacity =
        cap(q.getAbsoluteCapacity(), 0f, 1f) * 100;
    absoluteMaxCapacity =
        cap(q.getAbsoluteMaximumCapacity(), 0f, 1f) * 100;
    absoluteUsedCapacity =
        cap(q.getAbsoluteUsedCapacity(), 0f, 1f) * 100;
    numApplications = q.getNumApplications();
    allocatedContainers = q.getMetrics().getAllocatedContainers();
    pendingContainers = q.getMetrics().getPendingContainers();
    reservedContainers = q.getMetrics().getReservedContainers();
    queueName = q.getQueueName();
    state = q.getState();
    resourcesUsed = new ResourceInfo(q.getUsedResources());
    if (q instanceof PlanQueue && !((PlanQueue) q).showReservationsAsQueues()) {
      hideReservationQueues = true;
    }

    // add labels
    Set<String> labelSet = q.getAccessibleNodeLabels();
    if (labelSet != null) {
      nodeLabels.addAll(labelSet);
      Collections.sort(nodeLabels);
    }
    QueueCapacities qCapacities = q.getQueueCapacities();
    populateQueueCapacities(qCapacities);

    ResourceUsage queueResourceUsage = q.getQueueResourceUsage();
    populateQueueResourceUsage(queueResourceUsage);
  }
 
开发者ID:hopshadoop,项目名称:hops,代码行数:41,代码来源:CapacitySchedulerQueueInfo.java

示例10: CapacitySchedulerInfo

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue; //导入方法依赖的package包/类
public CapacitySchedulerInfo(CSQueue parent, CapacityScheduler cs) {
  this.queueName = parent.getQueueName();
  this.usedCapacity = parent.getUsedCapacity() * 100;
  this.capacity = parent.getCapacity() * 100;
  float max = parent.getMaximumCapacity();
  if (max < EPSILON || max > 1f)
    max = 1f;
  this.maxCapacity = max * 100;

  capacities = new QueueCapacitiesInfo(parent.getQueueCapacities(), false);
  queues = getQueues(parent);
  health = new CapacitySchedulerHealthInfo(cs);
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:14,代码来源:CapacitySchedulerInfo.java


注:本文中的org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue.getUsedCapacity方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。