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, toStringpublic void configure(org.apache.hadoop.conf.Configuration conf)
MetricsCollectorconfigure in interface MetricsCollectorconfigure in class TxMetricsCollectorpublic void gauge(String metricName, int value, String... tags)
MetricsCollectorgauge in interface MetricsCollectorgauge in class TxMetricsCollectorpublic void histogram(String metricName, int value)
MetricsCollectorhistogram in interface MetricsCollectorhistogram in class TxMetricsCollectorpublic void rate(String metricName)
MetricsCollectorrate in interface MetricsCollectorrate in class TxMetricsCollectorpublic void rate(String metricName, int count)
MetricsCollectorrate in interface MetricsCollectorrate in class TxMetricsCollectorprotected void startUp()
throws Exception
startUp in class TxMetricsCollectorExceptionprotected void shutDown()
throws Exception
shutDown in class TxMetricsCollectorExceptionCopyright © 2018 The Apache Software Foundation. All rights reserved.