@InterfaceAudience.Private public class MetricsReplicationTableSourceImpl extends Object implements MetricsReplicationTableSource
Modifier and Type | Field and Description |
---|---|
private MutableHistogram |
ageOfLastShippedOpHist |
private String |
ageOfLastShippedOpKey |
private String |
keyPrefix |
private MetricsReplicationSourceImpl |
rms |
private MutableFastCounter |
shippedBytesCounter |
private String |
shippedBytesKey |
private String |
tableName |
HBASE_METRICS_SYSTEM_NAME
Constructor and Description |
---|
MetricsReplicationTableSourceImpl(MetricsReplicationSourceImpl rms,
String tableName) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
decGauge(String gaugeName,
long delta)
Subtract some amount from a gauge.
|
long |
getLastShippedAge() |
String |
getMetricsContext()
Get the metrics context.
|
String |
getMetricsDescription()
Get the description of what this source exposes.
|
String |
getMetricsJmxContext()
Get the name of the context in JMX that this source will be exposed through.
|
String |
getMetricsName()
Get the name of the metrics that are being exported by this source.
|
long |
getShippedBytes() |
void |
incCounters(String counterName,
long delta)
Add some amount to a counter.
|
void |
incGauge(String gaugeName,
long delta)
Add some amount to a gauge.
|
void |
incrShippedBytes(long size) |
void |
init()
Clear out the metrics and re-prepare the source.
|
void |
removeMetric(String key)
Remove a metric and no longer announce it.
|
void |
setGauge(String gaugeName,
long value)
Set a gauge to a specific value.
|
void |
setLastShippedAge(long age) |
void |
updateHistogram(String name,
long value)
Add some value to a histogram.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMetricRegistryInfo
private final MetricsReplicationSourceImpl rms
private final String ageOfLastShippedOpKey
private final String shippedBytesKey
private final MutableHistogram ageOfLastShippedOpHist
private final MutableFastCounter shippedBytesCounter
public MetricsReplicationTableSourceImpl(MetricsReplicationSourceImpl rms, String tableName)
public void setLastShippedAge(long age)
setLastShippedAge
in interface MetricsReplicationTableSource
public void incrShippedBytes(long size)
incrShippedBytes
in interface MetricsReplicationTableSource
public void clear()
clear
in interface MetricsReplicationTableSource
public long getLastShippedAge()
getLastShippedAge
in interface MetricsReplicationTableSource
public long getShippedBytes()
getShippedBytes
in interface MetricsReplicationTableSource
public void init()
BaseSource
init
in interface BaseSource
public void setGauge(String gaugeName, long value)
BaseSource
setGauge
in interface BaseSource
gaugeName
- the name of the gaugevalue
- the valuepublic void incGauge(String gaugeName, long delta)
BaseSource
incGauge
in interface BaseSource
gaugeName
- the name of the gaugedelta
- the amount to change the gauge by.public void decGauge(String gaugeName, long delta)
BaseSource
decGauge
in interface BaseSource
gaugeName
- the name of the gaugedelta
- the amount to change the gauge by.public void removeMetric(String key)
BaseSource
removeMetric
in interface BaseSource
key
- Name of the gauge to remove.public void incCounters(String counterName, long delta)
BaseSource
incCounters
in interface BaseSource
counterName
- the name of the counterdelta
- the amount to change the counter by.public void updateHistogram(String name, long value)
BaseSource
updateHistogram
in interface BaseSource
name
- the name of the histogramvalue
- the value to add to the histogrampublic String getMetricsContext()
BaseSource
getMetricsContext
in interface BaseSource
public String getMetricsDescription()
BaseSource
getMetricsDescription
in interface BaseSource
public String getMetricsJmxContext()
BaseSource
getMetricsJmxContext
in interface BaseSource
public String getMetricsName()
BaseSource
getMetricsName
in interface BaseSource
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.