@InterfaceAudience.Private public class BaseSourceImpl extends Object implements BaseSource, MetricsSource
| 限定符和类型 | 字段和说明 |
|---|---|
protected HBaseMetrics2HadoopMetricsAdapter |
metricsAdapter
The adapter from hbase-metrics module to metrics2.
|
protected String |
metricsContext |
protected String |
metricsDescription |
protected String |
metricsJmxContext |
protected String |
metricsName |
protected DynamicMetricsRegistry |
metricsRegistry
已过时。
Use hbase-metrics/hbase-metrics-api module interfaces for new metrics.
Defining BaseSources for new metric groups (WAL, RPC, etc) is not needed anymore,
however, for existing
BaseSource implementations, please use the field
named "registry" which is a MetricRegistry instance together with the
HBaseMetrics2HadoopMetricsAdapter. |
protected MetricRegistry |
registry
Note that there are at least 4 MetricRegistry definitions in the source code.
|
HBASE_METRICS_SYSTEM_NAME| 构造器和说明 |
|---|
BaseSourceImpl(String metricsName,
String metricsDescription,
String metricsContext,
String metricsJmxContext) |
| 限定符和类型 | 方法和说明 |
|---|---|
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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMetricRegistryInfo@Deprecated protected final DynamicMetricsRegistry metricsRegistry
BaseSource implementations, please use the field
named "registry" which is a MetricRegistry instance together with the
HBaseMetrics2HadoopMetricsAdapter.protected final String metricsName
protected final String metricsDescription
protected final String metricsContext
protected final String metricsJmxContext
protected final MetricRegistry registry
protected final HBaseMetrics2HadoopMetricsAdapter metricsAdapter
MetricsRegionServerSourceImpl.public void init()
init 在接口中 BaseSourcepublic void setGauge(String gaugeName, long value)
setGauge 在接口中 BaseSourcegaugeName - gauge namevalue - the new value of the gauge.public void incGauge(String gaugeName, long delta)
incGauge 在接口中 BaseSourcegaugeName - The name of the gauge to increment.delta - The amount to increment the gauge by.public void decGauge(String gaugeName, long delta)
decGauge 在接口中 BaseSourcegaugeName - The name of the gauge.delta - the ammount to subtract from a gauge value.public void incCounters(String key, long delta)
incCounters 在接口中 BaseSourcekey - the name of the counterdelta - the ammount to incrementpublic void updateHistogram(String name, long value)
updateHistogram 在接口中 BaseSourcepublic void removeMetric(String key)
removeMetric 在接口中 BaseSourcekey - the key of the gauge to removepublic void getMetrics(MetricsCollector metricsCollector, boolean all)
getMetrics 在接口中 MetricsSourcepublic DynamicMetricsRegistry getMetricsRegistry()
public String getMetricsContext()
getMetricsContext 在接口中 BaseSourcepublic String getMetricsDescription()
getMetricsDescription 在接口中 BaseSourcepublic String getMetricsJmxContext()
getMetricsJmxContext 在接口中 BaseSourcepublic String getMetricsName()
getMetricsName 在接口中 BaseSourceCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.