Examples of MetricsRegistry


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

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

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

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

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

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

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

  /**
   * Test the common use cases
   */
  @Test public void testCommon() {
    MetricsVisitor visitor = mock(MetricsVisitor.class);
    MetricsRegistry registry = new MetricsRegistry("test");
    List<AbstractMetric> metrics = MetricsLists.builder("test")
        .addCounter(info("c1", "int counter"), 1)
        .addCounter(info("c2", "long counter"), 2L)
        .addGauge(info("g1", "int gauge"), 5)
        .addGauge(info("g2", "long gauge"), 6L)
View Full Code Here

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

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

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

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

  private static class TestSource {
    @Metric("C1 desc") MutableCounterLong c1;
    final MetricsRegistry registry;

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

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

  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

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

    }
    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

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

 
  RpcMetrics(Server server) {
    String port = String.valueOf(server.getListenerAddress().getPort());
    name = "RpcActivityForPort"+ port;
    this.server = server;
    registry = new MetricsRegistry("rpc").tag("port", "RPC port", port);
    LOG.debug("Initialized "+ registry);
  }
View Full Code Here

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

  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

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

    }
    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
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.