Search in sources :

Example 61 with MetricsSystem

use of org.apache.hadoop.metrics2.MetricsSystem in project ozone by apache.

the class SCMPipelineMetrics method create.

/**
 * Create and returns SCMPipelineMetrics instance.
 *
 * @return SCMPipelineMetrics
 */
public static synchronized SCMPipelineMetrics create() {
    if (instance != null) {
        return instance;
    }
    MetricsSystem ms = DefaultMetricsSystem.instance();
    instance = ms.register(SOURCE_NAME, "SCM PipelineManager Metrics", new SCMPipelineMetrics());
    return instance;
}
Also used : MetricsSystem(org.apache.hadoop.metrics2.MetricsSystem) DefaultMetricsSystem(org.apache.hadoop.metrics2.lib.DefaultMetricsSystem)

Example 62 with MetricsSystem

use of org.apache.hadoop.metrics2.MetricsSystem in project ozone by apache.

the class ContainerDataScrubberMetrics method create.

// no need for secure random
@SuppressWarnings("java:S2245")
public static ContainerDataScrubberMetrics create(final String volumeName) {
    MetricsSystem ms = DefaultMetricsSystem.instance();
    String name = "ContainerDataScrubberMetrics-" + (volumeName.isEmpty() ? "UndefinedDataNodeVolume" + ThreadLocalRandom.current().nextInt() : volumeName.replace(':', '-'));
    return ms.register(name, null, new ContainerDataScrubberMetrics(name, ms));
}
Also used : MetricsSystem(org.apache.hadoop.metrics2.MetricsSystem) DefaultMetricsSystem(org.apache.hadoop.metrics2.lib.DefaultMetricsSystem)

Example 63 with MetricsSystem

use of org.apache.hadoop.metrics2.MetricsSystem in project ozone by apache.

the class ContainerMetadataScrubberMetrics method create.

public static ContainerMetadataScrubberMetrics create() {
    MetricsSystem ms = DefaultMetricsSystem.instance();
    String name = "ContainerMetadataScrubberMetrics";
    return ms.register(name, null, new ContainerMetadataScrubberMetrics(name, ms));
}
Also used : MetricsSystem(org.apache.hadoop.metrics2.MetricsSystem) DefaultMetricsSystem(org.apache.hadoop.metrics2.lib.DefaultMetricsSystem)

Example 64 with MetricsSystem

use of org.apache.hadoop.metrics2.MetricsSystem in project ozone by apache.

the class ReplicationSupervisorMetrics method unRegister.

public void unRegister() {
    MetricsSystem ms = DefaultMetricsSystem.instance();
    ms.unregisterSource(SOURCE);
}
Also used : MetricsSystem(org.apache.hadoop.metrics2.MetricsSystem) DefaultMetricsSystem(org.apache.hadoop.metrics2.lib.DefaultMetricsSystem)

Example 65 with MetricsSystem

use of org.apache.hadoop.metrics2.MetricsSystem in project ozone by apache.

the class ContainerMetrics method create.

public static ContainerMetrics create(ConfigurationSource conf) {
    MetricsSystem ms = DefaultMetricsSystem.instance();
    // Percentile measurement is off by default, by watching no intervals
    int[] intervals = conf.getInts(DFSConfigKeysLegacy.DFS_METRICS_PERCENTILES_INTERVALS_KEY);
    return ms.register(STORAGE_CONTAINER_METRICS, "Storage Container Node Metrics", new ContainerMetrics(intervals));
}
Also used : MetricsSystem(org.apache.hadoop.metrics2.MetricsSystem) DefaultMetricsSystem(org.apache.hadoop.metrics2.lib.DefaultMetricsSystem)

Aggregations

MetricsSystem (org.apache.hadoop.metrics2.MetricsSystem)80 DefaultMetricsSystem (org.apache.hadoop.metrics2.lib.DefaultMetricsSystem)58 Test (org.junit.Test)23 MetricsSource (org.apache.hadoop.metrics2.MetricsSource)6 MetricsSystemImpl (org.apache.hadoop.metrics2.impl.MetricsSystemImpl)5 MyMetrics1 (org.apache.hadoop.metrics2.sink.RollingFileSystemSinkTestBase.MyMetrics1)5 JvmMetrics (org.apache.hadoop.hive.common.JvmMetrics)3 JvmMetrics (org.apache.hadoop.metrics2.source.JvmMetrics)3 After (org.junit.After)3 Path (org.apache.hadoop.fs.Path)2 LlapMetricsSystem (org.apache.hadoop.hive.llap.metrics.LlapMetricsSystem)2 MetricsCollectorImpl (org.apache.hadoop.metrics2.impl.MetricsCollectorImpl)2 MetricsRegistry (org.apache.hadoop.metrics2.lib.MetricsRegistry)2 ContainerId (org.apache.hadoop.yarn.api.records.ContainerId)2 QueueMetrics (org.apache.hadoop.yarn.server.resourcemanager.scheduler.QueueMetrics)2 Matchers.anyString (org.mockito.Matchers.anyString)2 ConsoleReporter (com.codahale.metrics.ConsoleReporter)1 MetricRegistry (com.codahale.metrics.MetricRegistry)1 ChannelFuture (io.netty.channel.ChannelFuture)1 URI (java.net.URI)1