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


Java ThreadMonitoring类代码示例

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


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

示例1: dumpTo

import org.apache.hadoop.hbase.monitoring.ThreadMonitoring; //导入依赖的package包/类
/**
 * Dump a textual representation of the executor's status
 * to the given writer.
 *
 * @param out the stream to write to
 * @param indent a string prefix for each line, used for indentation
 */
public void dumpTo(Writer out, String indent) throws IOException {
  out.write(indent + "Status for executor: " + executor + "\n");
  out.write(indent + "=======================================\n");
  out.write(indent + queuedEvents.size() + " events queued, " +
      running.size() + " running\n");
  if (!queuedEvents.isEmpty()) {
    out.write(indent + "Queued:\n");
    for (EventHandler e : queuedEvents) {
      out.write(indent + "  " + e + "\n");
    }
    out.write("\n");
  }
  if (!running.isEmpty()) {
    out.write(indent + "Running:\n");
    for (RunningEventStatus stat : running) {
      out.write(indent + "  Running on thread '" +
          stat.threadInfo.getThreadName() +
          "': " + stat.event + "\n");
      out.write(ThreadMonitoring.formatThreadInfo(
          stat.threadInfo, indent + "  "));
      out.write("\n");
    }
  }
  out.flush();
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:33,代码来源:ExecutorService.java

示例2: RunningEventStatus

import org.apache.hadoop.hbase.monitoring.ThreadMonitoring; //导入依赖的package包/类
public RunningEventStatus(Thread t, EventHandler event) {
  this.threadInfo = ThreadMonitoring.getThreadInfo(t);
  this.event = event;
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:5,代码来源:ExecutorService.java


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