• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java LI类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: render

import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.LI; //导入依赖的package包/类
@Override public void render(Block html) {
  UL<DIV<Hamlet>> mainList = html.
    div("#nav").
      h3("Cluster").
      ul().
        li().a(url("cluster"), "About")._().
        li().a(url("nodes"), "Nodes")._().
        li().a(url("nodelabels"), "Node Labels")._();
  UL<LI<UL<DIV<Hamlet>>>> subAppsList = mainList.
        li().a(url("apps"), "Applications").
          ul();
  subAppsList.li()._();
  for (YarnApplicationState state : YarnApplicationState.values()) {
    subAppsList.
            li().a(url("apps", state.toString()), state.toString())._();
  }
  subAppsList._()._();
  mainList.
        li().a(url("scheduler"), "Scheduler")._()._().
      h3("Tools").
      ul().
        li().a("/conf", "Configuration")._().
        li().a("/logs", "Local logs")._().
        li().a("/stacks", "Server stacks")._().
        li().a("/jmx?qry=Hadoop:*", "Server metrics")._()._()._();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:27,代码来源:NavBlock.java


示例2: render

import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.LI; //导入依赖的package包/类
@Override public void render(Block html) {
  UL<DIV<Hamlet>> mainList = html.
    div("#nav").
      h3("Cluster").
      ul().
        li().a(url("cluster"), "About")._().
        li().a(url("nodes"), "Nodes")._();
  UL<LI<UL<DIV<Hamlet>>>> subAppsList = mainList.
        li().a(url("apps"), "Applications").
          ul();
  subAppsList.li()._();
  for (YarnApplicationState state : YarnApplicationState.values()) {
    subAppsList.
            li().a(url("apps", state.toString()), state.toString())._();
  }
  subAppsList._()._();
  mainList.
        li().a(url("scheduler"), "Scheduler")._()._().
      h3("Tools").
      ul().
        li().a("/conf", "Configuration")._().
        li().a("/logs", "Local logs")._().
        li().a("/stacks", "Server stacks")._().
        li().a("/metrics", "Server metrics")._()._()._();
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:26,代码来源:NavBlock.java


示例3: render

import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.LI; //导入依赖的package包/类
@Override public void render(Block html) {
  UL<DIV<Hamlet>> mainList = html.
    div("#nav").
      h3("Cluster").
      ul().
        li().a(url("cluster"), "About")._().
        li().a(url("nodes"), "Nodes")._();
  UL<LI<UL<DIV<Hamlet>>>> subAppsList = mainList.
        li().a(url("apps"), "Applications").
          ul();
  subAppsList.li()._();
  for (RMAppState state : RMAppState.values()) {
    subAppsList.
            li().a(url("apps", state.toString()), state.toString())._();
  }
  subAppsList._()._();
  mainList.
        li().a(url("scheduler"), "Scheduler")._()._().
      h3("Tools").
      ul().
        li().a("/conf", "Configuration")._().
        li().a("/logs", "Local logs")._().
        li().a("/stacks", "Server stacks")._().
        li().a("/metrics", "Server metrics")._()._()._();
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:26,代码来源:NavBlock.java


示例4: render

import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.LI; //导入依赖的package包/类
@Override
public void render(Block html) {
  Collection<FairSchedulerQueueInfo> subQueues = fsqinfo.qinfo.getChildQueues();
  UL<Hamlet> ul = html.ul("#pq");
  for (FairSchedulerQueueInfo info : subQueues) {
    float capacity = info.getMaxResourcesFraction();
    float steadyFairShare = info.getSteadyFairShareMemoryFraction();
    float instantaneousFairShare = info.getFairShareMemoryFraction();
    float used = info.getUsedMemoryFraction();
    LI<UL<Hamlet>> li = ul.
      li().
        a(_Q).$style(width(capacity * Q_MAX_WIDTH)).
          $title(join(join(STEADY_FAIR_SHARE + ":", percent(steadyFairShare)),
              join(" " + INSTANTANEOUS_FAIR_SHARE + ":", percent(instantaneousFairShare)))).
          span().$style(join(Q_GIVEN, ";font-size:1px;", width(steadyFairShare / capacity))).
            _('.')._().
          span().$style(join(Q_INSTANTANEOUS_FS, ";font-size:1px;",
              width(instantaneousFairShare/capacity))).
            _('.')._().
          span().$style(join(width(used/capacity),
            ";font-size:1px;left:0%;", used > instantaneousFairShare ? Q_OVER : Q_UNDER)).
            _('.')._().
          span(".q", info.getQueueName())._().
        span().$class("qstats").$style(left(Q_STATS_POS)).
          _(join(percent(used), " used"))._();

    fsqinfo.qinfo = info;
    if (info instanceof FairSchedulerLeafQueueInfo) {
      li.ul("#lq").li()._(LeafQueueBlock.class)._()._();
    } else {
      li._(QueueBlock.class);
    }
    li._();
  }

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


示例5: render

import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.LI; //导入依赖的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


示例6: render

import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.LI; //导入依赖的package包/类
@Override public void render(Block html) {
  boolean addErrorsAndWarningsLink = false;
  Log log = LogFactory.getLog(NavBlock.class);
  if (log instanceof Log4JLogger) {
    Log4jWarningErrorMetricsAppender appender =
        Log4jWarningErrorMetricsAppender.findAppender();
    if (appender != null) {
      addErrorsAndWarningsLink = true;
    }
  }
  UL<DIV<Hamlet>> mainList = html.
    div("#nav").
      h3("Cluster").
      ul().
        li().a(url("cluster"), "About")._().
        li().a(url("nodes"), "Nodes")._().
        li().a(url("nodelabels"), "Node Labels")._();
  UL<LI<UL<DIV<Hamlet>>>> subAppsList = mainList.
        li().a(url("apps"), "Applications").
          ul();
  subAppsList.li()._();
  for (YarnApplicationState state : YarnApplicationState.values()) {
    subAppsList.
            li().a(url("apps", state.toString()), state.toString())._();
  }
  subAppsList._()._();
  UL<DIV<Hamlet>> tools = mainList.
        li().a(url("scheduler"), "Scheduler")._()._().
      h3("Tools").ul();
  tools.li().a("/conf", "Configuration")._().
        li().a("/logs", "Local logs")._().
        li().a("/stacks", "Server stacks")._().
        li().a("/jmx?qry=Hadoop:*", "Server metrics")._();

  if (addErrorsAndWarningsLink) {
    tools.li().a(url("errors-and-warnings"), "Errors/Warnings")._();
  }
  tools._()._();
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:40,代码来源:NavBlock.java


示例7: render

import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.LI; //导入依赖的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


示例8: render

import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.LI; //导入依赖的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


示例9: render

import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.LI; //导入依赖的package包/类
@Override
public void render(Block html) {
  Collection<FairSchedulerQueueInfo> subQueues = fsqinfo.qinfo.getChildQueues();
  UL<Hamlet> ul = html.ul("#pq");
  for (FairSchedulerQueueInfo info : subQueues) {
    float capacity = info.getMaxResourcesFraction();
    float fairShare = info.getFairShareMemoryFraction();
    float used = info.getUsedMemoryFraction();
    LI<UL<Hamlet>> li = ul.
      li().
        a(_Q).$style(width(capacity * Q_MAX_WIDTH)).
          $title(join("Fair Share:", percent(fairShare))).
          span().$style(join(Q_GIVEN, ";font-size:1px;", width(fairShare/capacity))).
            _('.')._().
          span().$style(join(width(used/capacity),
            ";font-size:1px;left:0%;", used > fairShare ? Q_OVER : Q_UNDER)).
            _('.')._().
          span(".q", info.getQueueName())._().
        span().$class("qstats").$style(left(Q_STATS_POS)).
          _(join(percent(used), " used"))._();

    fsqinfo.qinfo = info;
    if (info instanceof FairSchedulerLeafQueueInfo) {
      li.ul("#lq").li()._(LeafQueueBlock.class)._()._();
    } else {
      li._(QueueBlock.class);
    }
    li._();
  }

  ul._();
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:33,代码来源:FairSchedulerPage.java


示例10: render

import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.LI; //导入依赖的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.webapp.hamlet.Hamlet.LI类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TObjectFloatHashMap类代码示例发布时间:2022-05-22
下一篇:
Java XSParticle类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap