Package org.apache.hadoop.metrics.util

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


    final MetricsTimeVaryingRate loginFailure;
    private final MetricsRecord metricsRecord;
    private final MetricsRegistry registry;

    UgiMetrics() {
      registry = new MetricsRegistry();
      loginSuccess = new MetricsTimeVaryingRate("loginSuccess", registry,
          "Rate of successful kerberos logins and time taken in milliseconds");
      loginFailure = new MetricsTimeVaryingRate("loginFailure", registry,
          "Rate of failed kerberos logins and time taken in milliseconds");
      final MetricsContext metricsContext = MetricsUtil.getContext("ugi");
View Full Code Here


  /*
   * @param mr MetricsRegistry.
   * @return A copy of the passed MetricsRegistry minus the hbase metrics
   */
  private static MetricsRegistry copyMinusHBaseMetrics(final MetricsRegistry mr) {
    MetricsRegistry copy = new MetricsRegistry();
    for (MetricsBase metric : mr.getMetricsList()) {
      if (metric instanceof MetricsRate || metric instanceof MetricsString ||
          metric instanceof MetricsHistogram || metric instanceof ExactCounterMetric) {
        continue;
      }
      copy.add(metric.getName(), metric);
    }
    return copy;
  }
View Full Code Here

    errorCountsQueue = new LinkedList<Map<TaskError, Integer>>();
    startTimeQueue = new LinkedList<Long>();
    errorCountsMetrics = new HashMap<TaskError, MetricsTimeVaryingLong>();
    MetricsContext context = MetricsUtil.getContext("mapred");
    metricsRecord = MetricsUtil.createRecord(context, "taskerror");
    registry = new MetricsRegistry();
    windowLength = conf.getInt(WINDOW_LENGTH_KEY, WINDOW_LENGTH);
    numWindows = conf.getInt(NUM_WINDOWS_KEY, NUM_WINDOWS);

    context.registerUpdater(this);
View Full Code Here

  private MetricsRate metricsRate;
  private MetricsIntValue intValue;
  private MetricsTimeVaryingRate varyRate;

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

  private MetricsRate metricsRate;
  private MetricsIntValue intValue;
  private MetricsTimeVaryingRate varyRate;

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

  /*
   * @param mr MetricsRegistry.
   * @return A copy of the passed MetricsRegistry minus the hbase metrics
   */
  private static MetricsRegistry copyMinusHBaseMetrics(final MetricsRegistry mr) {
    MetricsRegistry copy = new MetricsRegistry();
    for (MetricsBase metric : mr.getMetricsList()) {
      if (metric instanceof MetricsRate || metric instanceof MetricsString) {
        continue;
      }
      copy.add(metric.getName(), metric);
    }
    return copy;
  }
View Full Code Here

  /*
   * @param mr MetricsRegistry.
   * @return A copy of the passed MetricsRegistry minus the hbase metrics
   */
  private static MetricsRegistry copyMinusHBaseMetrics(final MetricsRegistry mr) {
    MetricsRegistry copy = new MetricsRegistry();
    for (MetricsBase metric : mr.getMetricsList()) {
      if (metric instanceof org.apache.hadoop.hbase.metrics.MetricsRate) {
        continue;
      }
      copy.add(metric.getName(), metric);
    }
    return copy;
  }
View Full Code Here

  /*
   * @param mr MetricsRegistry.
   * @return A copy of the passed MetricsRegistry minus the hbase metrics
   */
  private static MetricsRegistry copyMinusHBaseMetrics(final MetricsRegistry mr) {
    MetricsRegistry copy = new MetricsRegistry();
    for (MetricsBase metric : mr.getMetricsList()) {
      if (metric instanceof MetricsRate || metric instanceof MetricsString ||
          metric instanceof MetricsHistogram || metric instanceof ExactCounterMetric) {
        continue;
      }
      copy.add(metric.getName(), metric);
    }
    return copy;
  }
View Full Code Here

  private MetricsRate metricsRate;
  private MetricsIntValue intValue;
  private MetricsTimeVaryingRate varyRate;
 
  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");
View Full Code Here

  /*
   * @param mr MetricsRegistry.
   * @return A copy of the passed MetricsRegistry minus the hbase metrics
   */
  private static MetricsRegistry copyMinusHBaseMetrics(final MetricsRegistry mr) {
    MetricsRegistry copy = new MetricsRegistry();
    for (MetricsBase metric : mr.getMetricsList()) {
      if (metric instanceof org.apache.hadoop.hbase.metrics.MetricsRate) {
        continue;
      }
      copy.add(metric.getName(), metric);
    }
    return copy;
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.metrics.util.MetricsRegistry

Copyright © 2018 www.massapicom. 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.