|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.metrics.BaseSourceImpl
@InterfaceAudience.Private public class BaseSourceImpl
Hadoop 2 implementation of BaseSource (using metrics2 framework). It handles registration to DefaultMetricsSystem and creation of the metrics registry. All MetricsSource's in hbase-hadoop2-compat should derive from this class.
| Field Summary | |
|---|---|
protected String |
metricsContext
|
protected String |
metricsDescription
|
protected String |
metricsJmxContext
|
protected String |
metricsName
|
protected DynamicMetricsRegistry |
metricsRegistry
|
| Fields inherited from interface org.apache.hadoop.hbase.metrics.BaseSource |
|---|
HBASE_METRICS_SYSTEM_NAME |
| Constructor Summary | |
|---|---|
BaseSourceImpl(String metricsName,
String metricsDescription,
String metricsContext,
String metricsJmxContext)
|
|
| Method Summary | |
|---|---|
void |
decGauge(String gaugeName,
long delta)
Decrease the value of a named gauge. |
void |
getMetrics(MetricsCollector metricsCollector,
boolean all)
|
String |
getMetricsContext()
|
String |
getMetricsDescription()
|
String |
getMetricsJmxContext()
|
String |
getMetricsName()
|
DynamicMetricsRegistry |
getMetricsRegistry()
|
void |
incCounters(String key,
long delta)
Increment a named counter by some value. |
void |
incGauge(String gaugeName,
long delta)
Add some amount to a gauge. |
void |
init()
|
void |
removeMetric(String key)
Remove a named gauge. |
void |
setGauge(String gaugeName,
long value)
Set a single gauge to a value. |
void |
updateHistogram(String name,
long value)
|
void |
updateQuantile(String name,
long value)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final DynamicMetricsRegistry metricsRegistry
protected final String metricsName
protected final String metricsDescription
protected final String metricsContext
protected final String metricsJmxContext
| Constructor Detail |
|---|
public BaseSourceImpl(String metricsName,
String metricsDescription,
String metricsContext,
String metricsJmxContext)
| Method Detail |
|---|
public void init()
init in interface BaseSource
public void setGauge(String gaugeName,
long value)
setGauge in interface BaseSourcegaugeName - gauge namevalue - the new value of the gauge.
public void incGauge(String gaugeName,
long delta)
incGauge in interface BaseSourcegaugeName - The name of the gauge to increment.delta - The amount to increment the gauge by.
public void decGauge(String gaugeName,
long delta)
decGauge in interface BaseSourcegaugeName - The name of the gauge.delta - the ammount to subtract from a gauge value.
public void incCounters(String key,
long delta)
incCounters in interface BaseSourcekey - the name of the counterdelta - the ammount to increment
public void updateHistogram(String name,
long value)
updateHistogram in interface BaseSource
public void updateQuantile(String name,
long value)
updateQuantile in interface BaseSourcepublic void removeMetric(String key)
removeMetric in interface BaseSourcekey -
public void getMetrics(MetricsCollector metricsCollector,
boolean all)
getMetrics in interface MetricsSourcepublic DynamicMetricsRegistry getMetricsRegistry()
public String getMetricsContext()
getMetricsContext in interface BaseSourcepublic String getMetricsDescription()
getMetricsDescription in interface BaseSourcepublic String getMetricsJmxContext()
getMetricsJmxContext in interface BaseSourcepublic String getMetricsName()
getMetricsName in interface BaseSource
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||