Examples of MetricsTimeVaryingRate


Examples of org.apache.hadoop.metrics.util.MetricsTimeVaryingRate

  private MetricsTimeVaryingRate get(String key) {
    return (MetricsTimeVaryingRate) registry.get(key);
  }
  private MetricsTimeVaryingRate create(String key) {
    return new MetricsTimeVaryingRate(key, this.registry);
  }
View Full Code Here

Examples of org.apache.hadoop.metrics.util.MetricsTimeVaryingRate

  private MetricsTimeVaryingRate create(String key) {
    return new MetricsTimeVaryingRate(key, this.registry);
  }

  public synchronized void inc(String name, int amt) {
    MetricsTimeVaryingRate m = get(name);
    if (m == null) {
      m = create(name);
    }
    m.inc(amt);
  }
View Full Code Here

Examples of org.apache.hadoop.metrics.util.MetricsTimeVaryingRate

    synchronized (registry) {
      // Iterate through the registry to propagate the different rpc metrics.

      for (String metricName : registry.getKeyList() ) {
        MetricsTimeVaryingRate value = (MetricsTimeVaryingRate) registry.get(metricName);

        value.pushMetric(metricsRecord);
      }
    }
    metricsRecord.update();
  }
View Full Code Here

Examples of org.apache.hadoop.metrics.util.MetricsTimeVaryingRate

  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);
View Full Code Here

Examples of org.apache.hadoop.metrics.util.MetricsTimeVaryingRate

  public synchronized void incrTimeVaryingMetric(
      String name,
      long amt,
      int numOps) {
    MetricsTimeVaryingRate m = (MetricsTimeVaryingRate)registry.get(name);
    if (m == null) {
      m = new MetricsTimeVaryingRate(name, this.registry);
      this.needsUpdateMessage = true;
    }
    if (numOps > 0) {
      m.inc(numOps, amt);
    }
  }
View Full Code Here

Examples of org.apache.hadoop.metrics.util.MetricsTimeVaryingRate

  private MetricsTimeVaryingRate get(String key) {
    return (MetricsTimeVaryingRate) registry.get(key);
  }
  private MetricsTimeVaryingRate create(String key) {
    MetricsTimeVaryingRate newMetric = new MetricsTimeVaryingRate(key, this.registry);
    return newMetric;
  }
View Full Code Here

Examples of org.apache.hadoop.metrics.util.MetricsTimeVaryingRate

    MetricsTimeVaryingRate newMetric = new MetricsTimeVaryingRate(key, this.registry);
    return newMetric;
  }

  public synchronized void inc(String name, int amt) {
    MetricsTimeVaryingRate m = get(name);
    if (m == null) {
      m = create(name);
    }
    m.inc(amt);
  }
View Full Code Here

Examples of org.apache.hadoop.metrics.util.MetricsTimeVaryingRate

    synchronized (registry) {
      // Iterate through the registry to propogate the different rpc metrics.

      for (String metricName : registry.getKeyList() ) {
        MetricsTimeVaryingRate value = (MetricsTimeVaryingRate) registry.get(metricName);

        value.pushMetric(metricsRecord);
      }
    }
    metricsRecord.update();
  }
View Full Code Here

Examples of org.apache.hadoop.metrics.util.MetricsTimeVaryingRate

            " queueTime= " + qTime +
            " procesingTime= " + processingTime);
        rpcMetrics.rpcQueueTime.inc(qTime);
        rpcMetrics.rpcProcessingTime.inc(processingTime);

  MetricsTimeVaryingRate m = rpcMetrics.metricsList.get(call.getMethodName());

  if (m != null) {
    m.inc(processingTime);
  }
  else {
    rpcMetrics.metricsList.put(call.getMethodName(), new MetricsTimeVaryingRate(call.getMethodName()));
    m = rpcMetrics.metricsList.get(call.getMethodName());
    m.inc(processingTime);
  }

        if (verbose) log("Return: "+value);

        return new ObjectWritable(method.getReturnType(), value);
View Full Code Here

Examples of org.apache.hadoop.metrics.util.MetricsTimeVaryingRate

  private MetricsTimeVaryingRate get(String key) {
    return (MetricsTimeVaryingRate) registry.get(key);
  }
  private MetricsTimeVaryingRate create(String key) {
    MetricsTimeVaryingRate newMetric = new MetricsTimeVaryingRate(key, this.registry);
    return newMetric;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.