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


Java MetricsIntValue类代码示例

本文整理汇总了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;未经允许,请勿转载。