Package org.apache.hadoop.metrics2.lib

Examples of org.apache.hadoop.metrics2.lib.MetricsRegistry


  @Test
  public void testIncGauge() throws Exception {
    String key = "testincgauge";
    bmsi.incGauge(key, 100);
    MetricMutableGaugeLong g = (MetricMutableGaugeLong) bmsi.metricsRegistry
        .get(key);
    assertEquals(key, g.name);
    bmsi.incGauge(key, 10);
    assertSame(g, bmsi.metricsRegistry.get(key));
  }
View Full Code Here


   * @param extended produce extended stat (stdev, min/max etc.) if true.
   * @return a new metric object
   */
  public MetricMutableStat newStat(String name, String description,
      String sampleName, String valueName, boolean extended) {
    MetricMutableStat ret = mf.newStat(name, description, sampleName,
        valueName, extended);
    return addNewMetricIfAbsent(name, ret, MetricMutableStat.class);
  }
View Full Code Here

    @Metric("YYY desc") MutableGaugeLong yyy;
    @Metric MutableRate s1;
    final MetricsRegistry registry;

    TestSource(String recName) {
      registry = new MetricsRegistry(recName);
    }
View Full Code Here

    @Metric("YYY desc") MutableGaugeLong yyy;
    @Metric MutableRate s1;
    final MetricsRegistry registry;

    TestSource(String recName) {
      registry = new MetricsRegistry(recName);
    }
View Full Code Here

  private final Map<String, QueueMetrics> users;
  private final Configuration conf;

  QueueMetrics(MetricsSystem ms, String queueName, Queue parent,
         boolean enableUserMetrics, Configuration conf) {
    registry = new MetricsRegistry(RECORD_INFO);
    this.queueName = queueName;
    this.parent = parent != null ? parent.getMetrics() : null;
    this.users = enableUserMetrics ? new HashMap<String, QueueMetrics>()
                                   : null;
    metricsSystem = ms;
View Full Code Here

  private final Map<String, QueueMetrics> users;
  private final Configuration conf;

  protected QueueMetrics(MetricsSystem ms, String queueName, Queue parent,
         boolean enableUserMetrics, Configuration conf) {
    registry = new MetricsRegistry(RECORD_INFO);
    this.queueName = queueName;
    this.parent = parent != null ? parent.getMetrics() : null;
    this.users = enableUserMetrics ? new HashMap<String, QueueMetrics>()
                                   : null;
    metricsSystem = ms;
View Full Code Here

  private final Map<String, QueueMetrics> users;
  private final Configuration conf;

  QueueMetrics(MetricsSystem ms, String queueName, Queue parent,
         boolean enableUserMetrics, Configuration conf) {
    registry = new MetricsRegistry(RECORD_INFO);
    this.queueName = queueName;
    this.parent = parent != null ? parent.getMetrics() : null;
    this.users = enableUserMetrics ? new HashMap<String, QueueMetrics>()
                                   : null;
    metricsSystem = ms;
View Full Code Here

    }
    return INSTANCE;
  }

  private static void registerMetrics() {
    registry = new MetricsRegistry(RECORD_INFO);
    registry.tag(RECORD_INFO, "ResourceManager");
    MetricsSystem ms = DefaultMetricsSystem.instance();
    if (ms != null) {
      ms.register("ClusterMetrics", "Metrics for the Yarn Cluster", INSTANCE);
    }
View Full Code Here

    @Metric("YYY desc") MutableGaugeLong yyy;
    @Metric MutableRate s1;
    final MetricsRegistry registry;

    TestSource(String recName) {
      registry = new MetricsRegistry(recName);
    }
View Full Code Here

  private final Map<String, QueueMetrics> users;
  private final Configuration conf;

  protected QueueMetrics(MetricsSystem ms, String queueName, Queue parent,
         boolean enableUserMetrics, Configuration conf) {
    registry = new MetricsRegistry(RECORD_INFO);
    this.queueName = queueName;
    this.parent = parent != null ? parent.getMetrics() : null;
    this.users = enableUserMetrics ? new HashMap<String, QueueMetrics>()
                                   : null;
    metricsSystem = ms;
View Full Code Here

TOP

Related Classes of org.apache.hadoop.metrics2.lib.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.