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;
}
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));
}
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));
}
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);
}
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));
}
Aggregations