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


Java InfoBlock类代码示例

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


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

示例1: render

import org.apache.hadoop.yarn.webapp.view.InfoBlock; //导入依赖的package包/类
@Override
protected void render(Block html) {
  SCMMetricsInfo metricsInfo = new SCMMetricsInfo(
      CleanerMetrics.getInstance(), ClientSCMMetrics.getInstance(),
          SharedCacheUploaderMetrics.getInstance());
  info("Shared Cache Manager overview").
      _("Started on:", Times.format(scm.getStartTime())).
      _("Cache hits: ", metricsInfo.getCacheHits()).
      _("Cache misses: ", metricsInfo.getCacheMisses()).
      _("Cache releases: ", metricsInfo.getCacheReleases()).
      _("Accepted uploads: ", metricsInfo.getAcceptedUploads()).
      _("Rejected uploads: ", metricsInfo.getRejectUploads()).
      _("Deleted files by the cleaner: ", metricsInfo.getTotalDeletedFiles()).
      _("Processed files by the cleaner: ", metricsInfo.getTotalProcessedFiles());
  html._(InfoBlock.class);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:17,代码来源:SCMOverviewPage.java

示例2: render

import org.apache.hadoop.yarn.webapp.view.InfoBlock; //导入依赖的package包/类
@Override
protected void render(Block html) {
  ApplicationId applicationID =
      ConverterUtils.toApplicationId(this.recordFactory,
          $(APPLICATION_ID));
  Application app = this.nmContext.getApplications().get(applicationID);
  AppInfo info = new AppInfo(app);
  info("Application's information")
        ._("ApplicationId", info.getId())
        ._("ApplicationState", info.getState())
        ._("User", info.getUser());
  TABLE<Hamlet> containersListBody = html._(InfoBlock.class)
      .table("#containers");
  for (String containerIdStr : info.getContainers()) {
    containersListBody
           .tr().td()
             .a(url("container", containerIdStr), containerIdStr)
             ._()._();
  }
  containersListBody._();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:22,代码来源:ApplicationPage.java

示例3: render

import org.apache.hadoop.yarn.webapp.view.InfoBlock; //导入依赖的package包/类
@Override
protected void render(Block html) {
  html._(MetricsOverviewTable.class);
  ResourceManager rm = getInstance(ResourceManager.class);
  ClusterInfo cinfo = new ClusterInfo(rm);
  info("Cluster overview").
    _("Cluster ID:", cinfo.getClusterId()).
    _("ResourceManager state:", cinfo.getState()).
    _("ResourceManager HA state:", cinfo.getHAState()).
    _("ResourceManager RMStateStore:", cinfo.getRMStateStore()).
    _("ResourceManager started on:", Times.format(cinfo.getStartedOn())).
    _("ResourceManager version:", cinfo.getRMBuildVersion() +
        " on " + cinfo.getRMVersionBuiltOn()).
    _("Hadoop version:", cinfo.getHadoopBuildVersion() +
        " on " + cinfo.getHadoopVersionBuiltOn());
  html._(InfoBlock.class);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:18,代码来源:AboutBlock.java

示例4: render

import org.apache.hadoop.yarn.webapp.view.InfoBlock; //导入依赖的package包/类
@Override
protected void render(Block html) {
  ResponseInfo ri = info("\'" + qinfo.getQueueName() + "\' Queue Status").
      _("Used Resources:", qinfo.getUsedResources().toString()).
      _("Num Active Applications:", qinfo.getNumActiveApplications()).
      _("Num Pending Applications:", qinfo.getNumPendingApplications()).
      _("Min Resources:", qinfo.getMinResources().toString()).
      _("Max Resources:", qinfo.getMaxResources().toString());
  int maxApps = qinfo.getMaxApplications();
  if (maxApps < Integer.MAX_VALUE) {
      ri._("Max Running Applications:", qinfo.getMaxApplications());
  }
  ri._(STEADY_FAIR_SHARE + ":", qinfo.getSteadyFairShare().toString());
  ri._(INSTANTANEOUS_FAIR_SHARE + ":", qinfo.getFairShare().toString());
  html._(InfoBlock.class);

  // clear the info contents so this queue's info doesn't accumulate into another queue's info
  ri.clear();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:20,代码来源:FairSchedulerPage.java

示例5: renderLeafQueueInfoWithPartition

import org.apache.hadoop.yarn.webapp.view.InfoBlock; //导入依赖的package包/类
private void renderLeafQueueInfoWithPartition(Block html) {
  nodeLabel = nodeLabel.length() == 0 ? "<DEFAULT_PARTITION>" : nodeLabel;
  // first display the queue's label specific details :
  ResponseInfo ri =
      info("\'" + lqinfo.getQueuePath().substring(5)
          + "\' Queue Status for Partition \'" + nodeLabel + "\'");
  renderQueueCapacityInfo(ri);
  html._(InfoBlock.class);
  // clear the info contents so this queue's info doesn't accumulate into
  // another queue's info
  ri.clear();

  // second display the queue specific details :
  ri =
      info("\'" + lqinfo.getQueuePath().substring(5) + "\' Queue Status")
          ._("Queue State:", lqinfo.getQueueState());
  renderCommonLeafQueueInfo(ri);

  
  html._(InfoBlock.class);

  // clear the info contents so this queue's info doesn't accumulate into
  // another queue's info
  ri.clear();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:26,代码来源:CapacitySchedulerPage.java

示例6: createAttemptHeadRoomTable

import org.apache.hadoop.yarn.webapp.view.InfoBlock; //导入依赖的package包/类
@Override
protected void createAttemptHeadRoomTable(Block html) {
  RMAppAttempt attempt = getRMAppAttempt();
  if (attempt != null) {
    if (!isApplicationInFinalState(YarnApplicationAttemptState
        .valueOf(attempt.getAppAttemptState().toString()))) {
      RMAppAttemptMetrics metrics = attempt.getRMAppAttemptMetrics();
      DIV<Hamlet> pdiv = html._(InfoBlock.class).div(_INFO_WRAP);
      info("Application Attempt Overview").clear();
      info("Application Attempt Metrics")._(
        "Application Attempt Headroom : ", metrics == null ? "N/A" :
          metrics.getApplicationAttemptHeadroom());
      pdiv._();
    }
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:17,代码来源:RMAppAttemptBlock.java

示例7: render

import org.apache.hadoop.yarn.webapp.view.InfoBlock; //导入依赖的package包/类
@Override
protected void render(Block html) {
  html._(MetricsOverviewTable.class);
  ResourceManager rm = getInstance(ResourceManager.class);
  ClusterInfo cinfo = new ClusterInfo(rm);
  info("Cluster overview").
    _("Cluster ID:", cinfo.getClusterId()).
    _("ResourceManager state:", cinfo.getState()).
    _("ResourceManager HA state:", cinfo.getHAState()).
    _("ResourceManager HA zookeeper connection state:",
        cinfo.getHAZookeeperConnectionState()).
    _("ResourceManager RMStateStore:", cinfo.getRMStateStore()).
    _("ResourceManager started on:", Times.format(cinfo.getStartedOn())).
    _("ResourceManager version:", cinfo.getRMBuildVersion() +
        " on " + cinfo.getRMVersionBuiltOn()).
    _("Hadoop version:", cinfo.getHadoopBuildVersion() +
        " on " + cinfo.getHadoopVersionBuiltOn());
  html._(InfoBlock.class);
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:20,代码来源:AboutBlock.java

示例8: renderLeafQueueInfoWithPartition

import org.apache.hadoop.yarn.webapp.view.InfoBlock; //导入依赖的package包/类
private void renderLeafQueueInfoWithPartition(Block html) {
  String nodeLabelDisplay = nodeLabel.length() == 0
      ? NodeLabel.DEFAULT_NODE_LABEL_PARTITION : nodeLabel;
  // first display the queue's label specific details :
  ResponseInfo ri =
      info("\'" + lqinfo.getQueuePath().substring(5)
          + "\' Queue Status for Partition \'" + nodeLabelDisplay + "\'");
  renderQueueCapacityInfo(ri, nodeLabel);
  html._(InfoBlock.class);
  // clear the info contents so this queue's info doesn't accumulate into
  // another queue's info
  ri.clear();

  // second display the queue specific details :
  ri =
      info("\'" + lqinfo.getQueuePath().substring(5) + "\' Queue Status")
          ._("Queue State:", lqinfo.getQueueState());
  renderCommonLeafQueueInfo(ri);

  html._(InfoBlock.class);
  // clear the info contents so this queue's info doesn't accumulate into
  // another queue's info
  ri.clear();
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:25,代码来源:CapacitySchedulerPage.java

示例9: render

import org.apache.hadoop.yarn.webapp.view.InfoBlock; //导入依赖的package包/类
@Override
protected void render(Block html) {
  NodeInfo info = new NodeInfo(this.context, this.resourceView);
  info("NodeManager information")
      ._("Total Vmem allocated for Containers",
          StringUtils.byteDesc(info.getTotalVmemAllocated() * BYTES_IN_MB))
      ._("Vmem enforcement enabled",
          info.isVmemCheckEnabled())
      ._("Total Pmem allocated for Container",
          StringUtils.byteDesc(info.getTotalPmemAllocated() * BYTES_IN_MB))
      ._("Pmem enforcement enabled",
          info.isPmemCheckEnabled())
       ._("Total VCores allocated for Containers",
          String.valueOf(info.getTotalVCoresAllocated())) 
      ._("NodeHealthyStatus",
          info.getHealthStatus())
      ._("LastNodeHealthTime", new Date(
          info.getLastNodeUpdateTime()))
      ._("NodeHealthReport",
          info.getHealthReport())
      ._("Node Manager Version:", info.getNMBuildVersion() +
          " on " + info.getNMVersionBuiltOn())
      ._("Hadoop Version:", info.getHadoopBuildVersion() +
          " on " + info.getHadoopVersionBuiltOn());
  html._(InfoBlock.class);
}
 
开发者ID:yncxcw,项目名称:big-c,代码行数:27,代码来源:NodePage.java

示例10: render

import org.apache.hadoop.yarn.webapp.view.InfoBlock; //导入依赖的package包/类
@Override
protected void render(Block html) {
  NodeInfo info = new NodeInfo(this.context, this.resourceView);
  info("NodeManager information")
      ._("Total Vmem allocated for Containers",
          StringUtils.byteDesc(info.getTotalVmemAllocated() * BYTES_IN_MB))
      ._("Vmem enforcement enabled",
          info.isVmemCheckEnabled())
      ._("Total Pmem allocated for Container",
          StringUtils.byteDesc(info.getTotalPmemAllocated() * BYTES_IN_MB))
      ._("Pmem enforcement enabled",
          info.isVmemCheckEnabled())
      ._("NodeHealthyStatus",
          info.getHealthStatus())
      ._("LastNodeHealthTime", new Date(
          info.getLastNodeUpdateTime()))
      ._("NodeHealthReport",
          info.getHealthReport())
      ._("Node Manager Version:", info.getNMBuildVersion() +
          " on " + info.getNMVersionBuiltOn())
      ._("Hadoop Version:", info.getHadoopBuildVersion() +
          " on " + info.getHadoopVersionBuiltOn());
  html._(InfoBlock.class);
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:25,代码来源:NodePage.java

示例11: render

import org.apache.hadoop.yarn.webapp.view.InfoBlock; //导入依赖的package包/类
@Override
protected void render(Block html) {
  ResponseInfo ri = info("\'" + qinfo.getQueueName() + "\' Queue Status").
      _("Used Resources:", qinfo.getUsedResources().toString()).
      _("Num Active Applications:", qinfo.getNumActiveApplications()).
      _("Num Pending Applications:", qinfo.getNumPendingApplications()).
      _("Min Resources:", qinfo.getMinResources().toString()).
      _("Max Resources:", qinfo.getMaxResources().toString());
  int maxApps = qinfo.getMaxApplications();
  if (maxApps < Integer.MAX_VALUE) {
      ri._("Max Running Applications:", qinfo.getMaxApplications());
  }
  ri._("Fair Share:", qinfo.getFairShare().toString());

  html._(InfoBlock.class);

  // clear the info contents so this queue's info doesn't accumulate into another queue's info
  ri.clear();
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:20,代码来源:FairSchedulerPage.java

示例12: render

import org.apache.hadoop.yarn.webapp.view.InfoBlock; //导入依赖的package包/类
@Override
protected void render(Block html) {
  ApplicationId applicationID = ApplicationId.fromString($(APPLICATION_ID));
  Application app = this.nmContext.getApplications().get(applicationID);
  AppInfo info = new AppInfo(app);
  info("Application's information")
        ._("ApplicationId", info.getId())
        ._("ApplicationState", info.getState())
        ._("User", info.getUser());
  TABLE<Hamlet> containersListBody = html._(InfoBlock.class)
      .table("#containers");
  for (String containerIdStr : info.getContainers()) {
    containersListBody
           .tr().td()
             .a(url("container", containerIdStr), containerIdStr)
             ._()._();
  }
  containersListBody._();
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:20,代码来源:ApplicationPage.java

示例13: render

import org.apache.hadoop.yarn.webapp.view.InfoBlock; //导入依赖的package包/类
@Override
protected void render(Block html) {
  ResponseInfo ri = info("\'" + qinfo.getQueueName() + "\' Queue Status").
      _("Used Resources:", qinfo.getUsedResources().toString()).
      _("Demand Resources:", qinfo.getDemandResources().toString()).
      _("Num Active Applications:", qinfo.getNumActiveApplications()).
      _("Num Pending Applications:", qinfo.getNumPendingApplications()).
      _("Min Resources:", qinfo.getMinResources().toString()).
      _("Max Resources:", qinfo.getMaxResources().toString());
  int maxApps = qinfo.getMaxApplications();
  if (maxApps < Integer.MAX_VALUE) {
      ri._("Max Running Applications:", qinfo.getMaxApplications());
  }
  ri._(STEADY_FAIR_SHARE + ":", qinfo.getSteadyFairShare().toString());
  ri._(INSTANTANEOUS_FAIR_SHARE + ":", qinfo.getFairShare().toString());
  html._(InfoBlock.class);

  // clear the info contents so this queue's info doesn't accumulate into another queue's info
  ri.clear();
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:21,代码来源:FairSchedulerPage.java

示例14: render

import org.apache.hadoop.yarn.webapp.view.InfoBlock; //导入依赖的package包/类
@Override
protected void render(Block html) {
  html._(MetricsOverviewTable.class);
  ResourceManager rm = getInstance(ResourceManager.class);
  ClusterInfo cinfo = new ClusterInfo(rm);
  info("Cluster overview").
    _("Cluster ID:", cinfo.getClusterId()).
    _("ResourceManager state:", cinfo.getState()).
    _("ResourceManager HA state:", cinfo.getHAState()).
    _("ResourceManager started on:", Times.format(cinfo.getStartedOn())).
    _("ResourceManager version:", cinfo.getRMBuildVersion() +
        " on " + cinfo.getRMVersionBuiltOn()).
    _("Hadoop version:", cinfo.getHadoopBuildVersion() +
        " on " + cinfo.getHadoopVersionBuiltOn());
  html._(InfoBlock.class);
}
 
开发者ID:Seagate,项目名称:hadoop-on-lustre2,代码行数:17,代码来源:AboutBlock.java


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