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


Java CSQueue.getAccessibleNodeLabels方法代码示例

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


在下文中一共展示了CSQueue.getAccessibleNodeLabels方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
  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

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


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