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

Java MetricsIntValue类代码示例

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

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



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

示例1: ClusterManagerMetrics

import org.apache.hadoop.metrics.util.MetricsIntValue; //导入依赖的package包/类
/**
 * Constructor.
 * @param types The available resource types.
 */
public ClusterManagerMetrics(Collection<ResourceType> types) {
  context = MetricsUtil.getContext(CONTEXT_NAME);
  metricsRecord = MetricsUtil.createRecord(context, CONTEXT_NAME);
  typeToResourceRequested = createTypeToResourceCountMap(types, "requested");
  typeToResourceGranted = createTypeToResourceCountMap(types, "granted");
  typeToResourceRevoked = createTypeToResourceCountMap(types, "revoked");
  typeToResourceReleased = createTypeToResourceCountMap(types, "released");
  typeToPendingCount = createTypeToCountMap(types, "pending");
  typeToRunningCount = createTypeToCountMap(types, "running");
  typeToTotalSlots = createTypeToCountMap(types, "total");
  typeToFreeSlots = createTypeToCountMap(types, "free");
  typeToSchedulerRunTime = createTypeToCountMap(types, "scheduler_runtime");
  typeToSchedulerCurrentCycleStart =
      new ConcurrentHashMap<ResourceType, Long>();
  sessionStatusToMetrics = createSessionStatusToMetricsMap();
  aliveNodes = new MetricsIntValue("alive_nodes", registry);
  deadNodes = new MetricsIntValue("dead_nodes", registry);
  blacklistedNodes = new MetricsIntValue("blacklisted_nodes", registry);
  numRunningSessions = new MetricsIntValue("num_running_sessions", registry);
  totalSessionCount = new MetricsTimeVaryingInt("total_sessions", registry);
  pendingCallsCount = new MetricsIntValue("num_pending_calls", registry);
  numCJTFailures = new MetricsTimeVaryingInt("num_cjt_failures", registry);
  numTaskTrackerRestarted = new MetricsIntValue("num_task_tracker_restarted", registry);
  numRemoteJTTimedout = new MetricsIntValue("num_remotejt_timedout", registry);
}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:30,代码来源:ClusterManagerMetrics.java


示例2: AvatarNodeMetrics

import org.apache.hadoop.metrics.util.MetricsIntValue; //导入依赖的package包/类
public AvatarNodeMetrics(NameNodeMetrics metrics) {
  this.metrics = metrics;

  ignoreDataNodes = new MetricsIntValue(namePref + "IgnoreDatanodes",
      metrics.registry, "Ignoring datanodes");
  numIgnoredDatanodes = new MetricsTimeVaryingLong(namePref
      + "NumIgnoredDatanodes", metrics.registry,
      "Number of ignored datanodes");

  numReportedBlocks = new MetricsTimeVaryingLong(namePref
      + "NumReportedBlocks", metrics.registry,
      "Blocks reported through incremental block reports");
  numRetryBlocks = new MetricsTimeVaryingLong(namePref + "NumRetryBlocks",
      metrics.registry, "Blocks retried for incremental block reports");

  numCleanerThreadExceptions = new MetricsTimeVaryingLong(namePref
      + "NumCleanerThreadExceptions", metrics.registry,
      "Exceptions when clearing deletion queues");

  numIngestFailures = new MetricsIntValue(namePref + "NumIngestFailures",
      metrics.registry, "Number of ingest failures");
  numCheckpointFailures = new MetricsIntValue(namePref
      + "NumCheckpointFailures", metrics.registry,
      "Number of checkpoint failures");
}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:26,代码来源:AvatarNodeMetrics.java


示例3: IPCLoggerChannelMetrics

import org.apache.hadoop.metrics.util.MetricsIntValue; //导入依赖的package包/类
private IPCLoggerChannelMetrics(IPCLoggerChannel ch,
    MetricsRecord metricRecords, String name) {
  this.ch = ch;
  this.metricsRecord = metricRecords;

  writeEndToEndLatency = new MetricsTimeVaryingRate("writeEndToEndLatency_"
      + name, registry);
  writeRpcLatency = new MetricsTimeVaryingRate("writeRpcLatency_" + name,
      registry);

  currentQueuedEditsSizeBytes = new MetricsLongValue(
      "currentQueuedEditsSizeBytes_" + name, registry);
  currentLagTransactions = new MetricsLongValue("currentLagTransactions_"
      + name, registry);
  currentLagTimeMicros = new MetricsLongValue("currentLagTimeMicros_" + name,
      registry);
  isOutOfSync = new MetricsIntValue("isOutOfSync_" + name, registry);
}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:19,代码来源:IPCLoggerChannelMetrics.java


示例4: ClusterManagerMetrics

import org.apache.hadoop.metrics.util.MetricsIntValue; //导入依赖的package包/类
/**
 * Constructor.
 * @param types The available resource types.
 */
public ClusterManagerMetrics(Collection<ResourceType> types) {
  context = MetricsUtil.getContext(CONTEXT_NAME);
  metricsRecord = MetricsUtil.createRecord(context, CONTEXT_NAME);
  typeToResourceRequested = createTypeToResourceCountMap(types, "requested");
  typeToResourceGranted = createTypeToResourceCountMap(types, "granted");
  typeToResourceRevoked = createTypeToResourceCountMap(types, "revoked");
  typeToResourceReleased = createTypeToResourceCountMap(types, "released");
  typeToPendingCount = createTypeToCountMap(types, "pending");
  typeToRunningCount = createTypeToCountMap(types, "running");
  typeToTotalSlots = createTypeToCountMap(types, "total");
  typeToFreeSlots = createTypeToCountMap(types, "free");
  typeToSchedulerRunTime = createTypeToCountMap(types, "scheduler_runtime");
  sessionStatusToMetrics = createSessionStatusToMetricsMap();
  aliveNodes = new MetricsIntValue("alive_nodes", registry);
  deadNodes = new MetricsIntValue("dead_nodes", registry);
  blacklistedNodes = new MetricsIntValue("blacklisted_nodes", registry);
  numRunningSessions = new MetricsIntValue("num_running_sessions", registry);
  totalSessionCount = new MetricsTimeVaryingInt("total_sessions", registry);
  pendingCallsCount = new MetricsIntValue("num_pending_calls", registry);
  numCJTFailures = new MetricsTimeVaryingInt("num_cjt_failures", registry);
}
 
开发者ID:iVCE,项目名称:RDFS,代码行数:26,代码来源:ClusterManagerMetrics.java


示例5: setUp

import org.apache.hadoop.metrics.util.MetricsIntValue; //导入依赖的package包/类
public void setUp() {
  this.registry = new MetricsRegistry();
  this.metricsRate = new MetricsRate("metricsRate", registry, "test");
  this.intValue = new MetricsIntValue("intValue", registry, "test");
  this.varyRate = new MetricsTimeVaryingRate("varyRate", registry, "test");
  this.stats = new TestStatistics(registry);
  MetricsContext context = MetricsUtil.getContext("hbase");
  this.metricsRecord = MetricsUtil.createRecord(context, "test");
  this.metricsRecord.setTag("TestStatistics", "test");
  //context.registerUpdater(this);

}
 
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:13,代码来源:TestMetricsMBeanBase.java


示例6: createTypeToCountMap

import org.apache.hadoop.metrics.util.MetricsIntValue; //导入依赖的package包/类
/**
 * Create a map of resource type -> current count.
 * @param resourceTypes The resource types.
 * @param actionType A string indicating pending, running etc.
 * @return The map.
 */
private Map<ResourceType, MetricsIntValue> createTypeToCountMap(
    Collection<ResourceType> resourceTypes, String actionType) {
  Map<ResourceType, MetricsIntValue> m =
      new HashMap<ResourceType, MetricsIntValue>();
  for (ResourceType t : resourceTypes) {
    String name = (actionType + "_" + t).toLowerCase();
    MetricsIntValue value = new MetricsIntValue(name, registry);
    m.put(t, value);
  }
  return m;
}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:18,代码来源:ClusterManagerMetrics.java


示例7: DatanodeThreadLivenessReporter

import org.apache.hadoop.metrics.util.MetricsIntValue; //导入依赖的package包/类
public DatanodeThreadLivenessReporter(long timeoutToReport,
    MetricsIntValue metrics) {
  threadInfo = new ThreadLivenessInfo[BackgroundThread.values().length];
  for (int i = 0; i < threadInfo.length; i++) {
    threadInfo[i] = new ThreadLivenessInfo();
  }
  this.timeoutToReport = timeoutToReport;
  this.metrics = metrics;
}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:10,代码来源:DatanodeThreadLivenessReporter.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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