@InterfaceAudience.Private public class HBaseMetrics2HadoopMetricsAdapter extends Object
Modifier and Type | Field and Description |
---|---|
private static String |
EMPTY_STRING |
private static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
HBaseMetrics2HadoopMetricsAdapter() |
Modifier and Type | Method and Description |
---|---|
private void |
addCounter(String name,
Counter counter,
org.apache.hadoop.metrics2.MetricsRecordBuilder builder) |
private void |
addGauge(String name,
Gauge<?> gauge,
org.apache.hadoop.metrics2.MetricsRecordBuilder builder) |
private void |
addHistogram(String name,
Histogram histogram,
org.apache.hadoop.metrics2.MetricsRecordBuilder builder)
Add Histogram value-distribution data to a Hadoop-Metrics2 record building.
|
private void |
addMeter(String name,
Meter meter,
org.apache.hadoop.metrics2.MetricsRecordBuilder builder)
Add Dropwizard-Metrics rate information to a Hadoop-Metrics2 record builder, converting the
rates to the appropriate unit.
|
private void |
addTimer(String name,
Timer timer,
org.apache.hadoop.metrics2.MetricsRecordBuilder builder) |
void |
snapshotAllMetrics(MetricRegistry metricRegistry,
org.apache.hadoop.metrics2.MetricsCollector collector)
Iterates over the MetricRegistry and adds them to the
collector . |
void |
snapshotAllMetrics(MetricRegistry metricRegistry,
org.apache.hadoop.metrics2.MetricsRecordBuilder builder)
Iterates over the MetricRegistry and adds them to the
builder . |
private static final org.slf4j.Logger LOG
private static final String EMPTY_STRING
public HBaseMetrics2HadoopMetricsAdapter()
public void snapshotAllMetrics(MetricRegistry metricRegistry, org.apache.hadoop.metrics2.MetricsCollector collector)
collector
.collector
- A metrics collectorpublic void snapshotAllMetrics(MetricRegistry metricRegistry, org.apache.hadoop.metrics2.MetricsRecordBuilder builder)
builder
.builder
- A record builderprivate void addGauge(String name, Gauge<?> gauge, org.apache.hadoop.metrics2.MetricsRecordBuilder builder)
private void addCounter(String name, Counter counter, org.apache.hadoop.metrics2.MetricsRecordBuilder builder)
private void addHistogram(String name, Histogram histogram, org.apache.hadoop.metrics2.MetricsRecordBuilder builder)
name
- A base name for this record.histogram
- A histogram to measure distribution of values.builder
- A Hadoop-Metrics2 record builder.private void addMeter(String name, Meter meter, org.apache.hadoop.metrics2.MetricsRecordBuilder builder)
builder
- A Hadoop-Metrics2 record builder.name
- A base name for this record.Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.