use of org.apache.hadoop.metrics2.MetricsCollector in project hbase by apache.
the class MetricsTableLatenciesImpl method getMetrics.
@Override
public void getMetrics(MetricsCollector metricsCollector, boolean all) {
MetricsRecordBuilder mrb = metricsCollector.addRecord(metricsName);
// source is registered in supers constructor, sometimes called before the whole initialization.
metricsRegistry.snapshot(mrb, all);
if (metricsAdapter != null) {
// snapshot MetricRegistry as well
metricsAdapter.snapshotAllMetrics(registry, mrb);
}
}
use of org.apache.hadoop.metrics2.MetricsCollector in project hbase by apache.
the class MetricsIOSourceImpl method getMetrics.
@Override
public void getMetrics(MetricsCollector metricsCollector, boolean all) {
MetricsRecordBuilder mrb = metricsCollector.addRecord(metricsName);
// wrapper can be null because this function is called inside of init.
if (wrapper != null) {
mrb.addCounter(Interns.info(CHECKSUM_FAILURES_KEY, CHECKSUM_FAILURES_DESC), wrapper.getChecksumFailures());
}
metricsRegistry.snapshot(mrb, all);
}
Aggregations