Package org.apache.hadoop.metrics2.util

Examples of org.apache.hadoop.metrics2.util.MetricSampleQuantiles


    final int expectedCountFromGanglia30 = expectedMetrics.length;
    final int expectedCountFromGanglia31 = 2 * expectedMetrics.length;

    // Setup test for GangliaSink30
    AbstractGangliaSink gsink30 = new GangliaSink30();
    gsink30.init(cb.subset("test"));
    MockDatagramSocket mockds30 = new MockDatagramSocket();
    GangliaMetricsTestHelper.setDatagramSocket(gsink30, mockds30);

    // Setup test for GangliaSink31
    AbstractGangliaSink gsink31 = new GangliaSink31();
View Full Code Here


    gsink30.init(cb.subset("test"));
    MockDatagramSocket mockds30 = new MockDatagramSocket();
    GangliaMetricsTestHelper.setDatagramSocket(gsink30, mockds30);

    // Setup test for GangliaSink31
    AbstractGangliaSink gsink31 = new GangliaSink31();
    gsink31.init(cb.subset("test"));
    MockDatagramSocket mockds31 = new MockDatagramSocket();
    GangliaMetricsTestHelper.setDatagramSocket(gsink31, mockds31);

    // register the sinks
    ms.register("gsink30", "gsink30 desc", gsink30);
View Full Code Here

  }

  public static DataNodeMetrics create(Configuration conf, String dnName) {
    String sessionId = conf.get(DFSConfigKeys.DFS_METRICS_SESSION_ID_KEY);
    MetricsSystem ms = DefaultMetricsSystem.instance();
    JvmMetrics jm = JvmMetrics.create("DataNode", sessionId, ms);
    String name = "DataNodeActivity-"+ (dnName.isEmpty()
        ? "UndefinedDataNodeName"+ DFSUtil.getRandom().nextInt()
            : dnName.replace(':', '-'));

    // Percentile measurement is off by default, by watching no intervals
View Full Code Here

  public static NameNodeMetrics create(Configuration conf, NamenodeRole r) {
    String sessionId = conf.get(DFSConfigKeys.DFS_METRICS_SESSION_ID_KEY);
    String processName = r.toString();
    MetricsSystem ms = DefaultMetricsSystem.instance();
    JvmMetrics jm = JvmMetrics.create(processName, sessionId, ms);
   
    // Percentile measurement is off by default, by watching no intervals
    int[] intervals =
        conf.getInts(DFSConfigKeys.DFS_METRICS_PERCENTILES_INTERVALS_KEY);
    return ms.register(new NameNodeMetrics(processName, sessionId,
View Full Code Here

      int percentile = (int) (100 * quantiles[i].quantile);
      quantileInfos[i] = info(String.format(nameTemplate, percentile),
          String.format(descTemplate, percentile));
    }

    estimator = new MetricSampleQuantiles(quantiles);
    executor = new MetricsExecutorImpl();
    this.interval = interval;
    executor.getExecutor().scheduleAtFixedRate(new RolloverSample(this),
        interval,
        interval,
View Full Code Here

   */
  public MetricMutableQuantiles(String name, String description, String sampleName,
                                String valueName, int interval) {
    super(name, description);

    estimator = new MetricSampleQuantiles(quantiles);

    executor = new MetricsExecutorImpl();

    this.interval = interval;
    executor.getExecutor().scheduleAtFixedRate(new RolloverSample(this),
View Full Code Here

      int percentile = (int) (100 * quantiles[i].quantile);
      quantileInfos[i] = info(String.format(nameTemplate, ucName, percentile, interval, uvName),
          String.format(descTemplate, percentile, lvName, interval, desc));
    }

    estimator = new MetricSampleQuantiles(quantiles);
    executor = new MetricsExecutorImpl();
    this.interval = interval;
    executor.getExecutor().scheduleAtFixedRate(new RolloverSample(this),
        interval,
        interval,
View Full Code Here

      int percentile = (int) (100 * quantiles[i].quantile);
      quantileInfos[i] = info(String.format(nameTemplate, ucName, percentile, interval, uvName),
          String.format(descTemplate, percentile, lvName, interval, desc));
    }

    estimator = new MetricSampleQuantiles(quantiles);
    executor = new MetricsExecutorImpl();
    this.interval = interval;
    executor.getExecutor().scheduleAtFixedRate(new RolloverSample(this),
        interval,
        interval,
View Full Code Here

   */
  public MetricMutableQuantiles(String name, String description, String sampleName,
                                String valueName, int interval) {
    super(name, description);

    estimator = new MetricSampleQuantiles(quantiles);

    executor = new MetricsExecutorImpl();

    this.interval = interval;
    executor.getExecutor().scheduleAtFixedRate(new RolloverSample(this),
View Full Code Here

      int percentile = (int) (100 * quantiles[i].quantile);
      quantileInfos[i] = info(String.format(nameTemplate, percentile),
          String.format(descTemplate, percentile));
    }

    estimator = new MetricSampleQuantiles(quantiles);
    executor = new MetricsExecutorImpl();
    this.interval = interval;
    executor.getExecutor().scheduleAtFixedRate(new RolloverSample(this),
        interval,
        interval,
View Full Code Here

TOP

Related Classes of org.apache.hadoop.metrics2.util.MetricSampleQuantiles

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.