public class DefaultMetricsCollector extends TxMetricsCollector
The reporting frequency for this collector can be configured by setting the
data.tx.metrics.period
configuration property to the reporting frequency in seconds.
Constructor and Description |
---|
DefaultMetricsCollector() |
Modifier and Type | Method and Description |
---|---|
void |
configure(org.apache.hadoop.conf.Configuration conf)
Called before the collector service is started, allowing the collector to setup any
required configuration.
|
void |
gauge(String metricName,
int value,
String... tags)
Report a metric as an absolute value.
|
void |
histogram(String metricName,
int value)
Report a metric calculating the distribution of the value.
|
void |
rate(String metricName)
Report a metric as a count over a given time duration.
|
void |
rate(String metricName,
int count)
Report a metric as a count over a given time duration.
|
protected void |
shutDown() |
protected void |
startUp() |
addListener, executor, isRunning, start, startAndWait, state, stop, stopAndWait, toString
public void configure(org.apache.hadoop.conf.Configuration conf)
MetricsCollector
configure
in interface MetricsCollector
configure
in class TxMetricsCollector
public void gauge(String metricName, int value, String... tags)
MetricsCollector
gauge
in interface MetricsCollector
gauge
in class TxMetricsCollector
public void histogram(String metricName, int value)
MetricsCollector
histogram
in interface MetricsCollector
histogram
in class TxMetricsCollector
public void rate(String metricName)
MetricsCollector
rate
in interface MetricsCollector
rate
in class TxMetricsCollector
public void rate(String metricName, int count)
MetricsCollector
rate
in interface MetricsCollector
rate
in class TxMetricsCollector
protected void startUp() throws Exception
startUp
in class TxMetricsCollector
Exception
protected void shutDown() throws Exception
shutDown
in class TxMetricsCollector
Exception
Copyright © 2016 The Apache Software Foundation. All rights reserved.