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


Java CapacitySchedulerQueueInfo类代码示例

本文整理汇总了Java中org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.CapacitySchedulerQueueInfo的典型用法代码示例。如果您正苦于以下问题:Java CapacitySchedulerQueueInfo类的具体用法?Java CapacitySchedulerQueueInfo怎么用?Java CapacitySchedulerQueueInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


CapacitySchedulerQueueInfo类属于org.apache.hadoop.yarn.server.resourcemanager.webapp.dao包,在下文中一共展示了CapacitySchedulerQueueInfo类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getQueueInfo

import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.CapacitySchedulerQueueInfo; //导入依赖的package包/类
private CapacitySchedulerQueueInfo getQueueInfo(String name,
    CapacitySchedulerQueueInfoList info) {
  if (info != null) {
    for (CapacitySchedulerQueueInfo queueInfo : info.getQueueInfoList()) {
      if (queueInfo.getQueueName().equals(name)) {
        return queueInfo;
      } else {
        CapacitySchedulerQueueInfo result =
            getQueueInfo(name, queueInfo.getQueues());
        if (result == null) {
          continue;
        }
        return result;
      }
    }
  }
  return null;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:19,代码来源:TestCapacityScheduler.java

示例2: render

import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.CapacitySchedulerQueueInfo; //导入依赖的package包/类
@Override
public void render(Block html) {
  ArrayList<CapacitySchedulerQueueInfo> subQueues =
          (csqinfo.qinfo == null) ? csqinfo.csinfo.getQueues().getQueueInfoList()
                  : csqinfo.qinfo.getQueues().getQueueInfoList();
  UL<Hamlet> ul = html.ul("#pq");
  for (CapacitySchedulerQueueInfo info : subQueues) {
    float used = info.getUsedCapacity() / 100;
    float absCap = info.getAbsoluteCapacity() / 100;
    float absMaxCap = info.getAbsoluteMaxCapacity() / 100;
    float absUsedCap = info.getAbsoluteUsedCapacity() / 100;
    LI<UL<Hamlet>> li = ul.
            li().
            a(_Q).$style(width(absMaxCap * Q_MAX_WIDTH)).
            $title(join("Absolute Capacity:", percent(absCap))).
            span().$style(join(Q_GIVEN, ";font-size:1px;", width(absCap/absMaxCap))).
            _('.')._().
            span().$style(join(width(absUsedCap/absMaxCap),
            ";font-size:1px;left:0%;", absUsedCap > absCap ? Q_OVER : Q_UNDER)).
            _('.')._().
            span(".q", "Queue: "+info.getQueuePath().substring(5))._().
            span().$class("qstats").$style(left(Q_STATS_POS)).
            _(join(percent(used), " used"))._();

    csqinfo.qinfo = info;
    if (info.getQueues() == null) {
      li.ul("#lq").li()._(LeafQueueInfoBlock.class)._()._();
      li.ul("#lq").li()._(QueueUsersInfoBlock.class)._()._();
    } else {
      li._(QueueBlock.class);
    }
    li._();
  }

  ul._();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:37,代码来源:CapacitySchedulerPage.java

示例3: render

import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.CapacitySchedulerQueueInfo; //导入依赖的package包/类
@Override
public void render(Block html) {
  ArrayList<CapacitySchedulerQueueInfo> subQueues =
      (csqinfo.qinfo == null) ? csqinfo.csinfo.getQueues().getQueueInfoList()
          : csqinfo.qinfo.getQueues().getQueueInfoList();
  UL<Hamlet> ul = html.ul("#pq");
  for (CapacitySchedulerQueueInfo info : subQueues) {
    float used = info.getUsedCapacity() / 100;
    float absCap = info.getAbsoluteCapacity() / 100;
    float absMaxCap = info.getAbsoluteMaxCapacity() / 100;
    float absUsedCap = info.getAbsoluteUsedCapacity() / 100;
    LI<UL<Hamlet>> li = ul.
      li().
        a(_Q).$style(width(absMaxCap * Q_MAX_WIDTH)).
          $title(join("Absolute Capacity:", percent(absCap))).
          span().$style(join(Q_GIVEN, ";font-size:1px;", width(absCap/absMaxCap))).
            _('.')._().
          span().$style(join(width(absUsedCap/absMaxCap),
            ";font-size:1px;left:0%;", absUsedCap > absCap ? Q_OVER : Q_UNDER)).
            _('.')._().
          span(".q", info.getQueuePath().substring(5))._().
        span().$class("qstats").$style(left(Q_STATS_POS)).
          _(join(percent(used), " used"))._();

    csqinfo.qinfo = info;
    if (info.getQueues() == null) {
      li.ul("#lq").li()._(LeafQueueInfoBlock.class)._()._();
      li.ul("#lq").li()._(QueueUsersInfoBlock.class)._()._();
    } else {
      li._(QueueBlock.class);
    }
    li._();
  }

  ul._();
}
 
开发者ID:yncxcw,项目名称:big-c,代码行数:37,代码来源:CapacitySchedulerPage.java

示例4: render

import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.CapacitySchedulerQueueInfo; //导入依赖的package包/类
@Override
public void render(Block html) {
  ArrayList<CapacitySchedulerQueueInfo> subQueues =
      (csqinfo.qinfo == null) ? csqinfo.csinfo.getQueues().getQueueInfoList()
          : csqinfo.qinfo.getQueues().getQueueInfoList();
  UL<Hamlet> ul = html.ul("#pq");
  for (CapacitySchedulerQueueInfo info : subQueues) {
    float used = info.getUsedCapacity() / 100;
    float absCap = info.getAbsoluteCapacity() / 100;
    float absMaxCap = info.getAbsoluteMaxCapacity() / 100;
    float absUsedCap = info.getAbsoluteUsedCapacity() / 100;
    LI<UL<Hamlet>> li = ul.
      li().
        a(_Q).$style(width(absMaxCap * Q_MAX_WIDTH)).
          $title(join("Absolute Capacity:", percent(absCap))).
          span().$style(join(Q_GIVEN, ";font-size:1px;", width(absCap/absMaxCap))).
            _('.')._().
          span().$style(join(width(absUsedCap/absMaxCap),
            ";font-size:1px;left:0%;", absUsedCap > absCap ? Q_OVER : Q_UNDER)).
            _('.')._().
          span(".q", info.getQueuePath().substring(5))._().
        span().$class("qstats").$style(left(Q_STATS_POS)).
          _(join(percent(used), " used"))._();

    csqinfo.qinfo = info;
    if (info.getQueues() == null) {
      li.ul("#lq").li()._(LeafQueueInfoBlock.class)._()._();
    } else {
      li._(QueueBlock.class);
    }
    li._();
  }

  ul._();
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:36,代码来源:CapacitySchedulerPage.java

示例5: render

import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.CapacitySchedulerQueueInfo; //导入依赖的package包/类
@Override
public void render(Block html) {
  ArrayList<CapacitySchedulerQueueInfo> subQueues = (csqinfo.qinfo == null)
      ? csqinfo.csinfo.getQueues().getQueueInfoList()
      : csqinfo.qinfo.getQueues().getQueueInfoList();

  UL<Hamlet> ul = html.ul("#pq");
  float used;
  float absCap;
  float absMaxCap;
  float absUsedCap;
  for (CapacitySchedulerQueueInfo info : subQueues) {
    String nodeLabel = (csqinfo.label == null) ? "" : csqinfo.label;
    //DEFAULT_NODE_LABEL_PARTITION is accessible to all queues
    //other exclsiveNodeLabels are accessible only if configured
    if (!nodeLabel.isEmpty()// i.e. its DEFAULT_NODE_LABEL_PARTITION
        && csqinfo.isExclusiveNodeLabel
        && !info.getNodeLabels().contains("*")
        && !info.getNodeLabels().contains(nodeLabel)) {
      continue;
    }
    PartitionQueueCapacitiesInfo partitionQueueCapsInfo = info
        .getCapacities().getPartitionQueueCapacitiesInfo(nodeLabel);
    used = partitionQueueCapsInfo.getUsedCapacity() / 100;
    absCap = partitionQueueCapsInfo.getAbsoluteCapacity() / 100;
    absMaxCap = partitionQueueCapsInfo.getAbsoluteMaxCapacity() / 100;
    absUsedCap = partitionQueueCapsInfo.getAbsoluteUsedCapacity() / 100;

    LI<UL<Hamlet>> li = ul.
      li().
        a(_Q).$style(width(absMaxCap * Q_MAX_WIDTH)).
          $title(join("Absolute Capacity:", percent(absCap))).
          span().$style(join(Q_GIVEN, ";font-size:1px;", width(absCap/absMaxCap))).
            _('.')._().
          span().$style(join(width(absUsedCap/absMaxCap),
            ";font-size:1px;left:0%;", absUsedCap > absCap ? Q_OVER : Q_UNDER)).
            _('.')._().
          span(".q", "Queue: "+info.getQueuePath().substring(5))._().
        span().$class("qstats").$style(left(Q_STATS_POS)).
          _(join(percent(used), " used"))._();

    csqinfo.qinfo = info;
    if (info.getQueues() == null) {
      li.ul("#lq").li()._(LeafQueueInfoBlock.class)._()._();
      li.ul("#lq").li()._(QueueUsersInfoBlock.class)._()._();
    } else {
      li._(QueueBlock.class);
    }
    li._();
  }

  ul._();
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:54,代码来源:CapacitySchedulerPage.java


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