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


Java CSQueue.getQueueResourceUsage方法代码示例

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


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

示例1: 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

示例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();
    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

示例3: 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

示例4: checkPendingResource

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue; //导入方法依赖的package包/类
private void checkPendingResource(CSQueue queue, String partition, int pending) {
  ResourceUsage ru = queue.getQueueResourceUsage();
  Assert.assertEquals(pending, ru.getPending(partition).getMemory());
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:5,代码来源:TestProportionalCapacityPreemptionPolicyForNodePartitions.java

示例5: checkPendingResource

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue; //导入方法依赖的package包/类
public void checkPendingResource(CSQueue queue, String partition, int pending) {
  ResourceUsage ru = queue.getQueueResourceUsage();
  Assert.assertEquals(pending, ru.getPending(partition).getMemorySize());
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:5,代码来源:ProportionalCapacityPreemptionPolicyMockFramework.java

示例6: checkReservedResource

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue; //导入方法依赖的package包/类
public void checkReservedResource(CSQueue queue, String partition, int reserved) {
  ResourceUsage ru = queue.getQueueResourceUsage();
  Assert.assertEquals(reserved, ru.getReserved(partition).getMemorySize());
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:5,代码来源:ProportionalCapacityPreemptionPolicyMockFramework.java


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