Class MetricsReplicationTableSourceImpl
java.lang.Object
org.apache.hadoop.hbase.replication.regionserver.MetricsReplicationTableSourceImpl
- All Implemented Interfaces:
BaseSource
,MetricsReplicationTableSource
@Private
public class MetricsReplicationTableSourceImpl
extends Object
implements MetricsReplicationTableSource
This is the metric source for table level replication metrics. We can easy monitor some useful
table level replication metrics such as ageOfLastShippedOp and shippedBytes
-
Field Summary
Modifier and TypeFieldDescriptionprivate final MutableHistogram
private final String
private String
private final MetricsReplicationSourceImpl
private final MutableFastCounter
private final String
private final String
Fields inherited from interface org.apache.hadoop.hbase.metrics.BaseSource
HBASE_METRICS_SYSTEM_NAME
-
Constructor Summary
ConstructorDescriptionMetricsReplicationTableSourceImpl
(MetricsReplicationSourceImpl rms, String tableName) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
void
Subtract some amount from a gauge.long
Get the metrics context.Get the description of what this source exposes.Get the name of the context in JMX that this source will be exposed through.Get the name of the metrics that are being exported by this source.long
void
incCounters
(String counterName, long delta) Add some amount to a counter.void
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
Set a gauge to a specific value.void
setLastShippedAge
(long age) void
updateHistogram
(String name, long value) Add some value to a histogram.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.metrics.BaseSource
getMetricRegistryInfo
-
Field Details
-
rms
-
tableName
-
ageOfLastShippedOpKey
-
keyPrefix
-
shippedBytesKey
-
ageOfLastShippedOpHist
-
shippedBytesCounter
-
-
Constructor Details
-
MetricsReplicationTableSourceImpl
-
-
Method Details
-
setLastShippedAge
- Specified by:
setLastShippedAge
in interfaceMetricsReplicationTableSource
-
incrShippedBytes
- Specified by:
incrShippedBytes
in interfaceMetricsReplicationTableSource
-
clear
- Specified by:
clear
in interfaceMetricsReplicationTableSource
-
getLastShippedAge
- Specified by:
getLastShippedAge
in interfaceMetricsReplicationTableSource
-
getShippedBytes
- Specified by:
getShippedBytes
in interfaceMetricsReplicationTableSource
-
init
Description copied from interface:BaseSource
Clear out the metrics and re-prepare the source.- Specified by:
init
in interfaceBaseSource
-
setGauge
Description copied from interface:BaseSource
Set a gauge to a specific value.- Specified by:
setGauge
in interfaceBaseSource
- Parameters:
gaugeName
- the name of the gaugevalue
- the value
-
incGauge
Description copied from interface:BaseSource
Add some amount to a gauge.- Specified by:
incGauge
in interfaceBaseSource
- Parameters:
gaugeName
- the name of the gaugedelta
- the amount to change the gauge by.
-
decGauge
Description copied from interface:BaseSource
Subtract some amount from a gauge.- Specified by:
decGauge
in interfaceBaseSource
- Parameters:
gaugeName
- the name of the gaugedelta
- the amount to change the gauge by.
-
removeMetric
Description copied from interface:BaseSource
Remove a metric and no longer announce it.- Specified by:
removeMetric
in interfaceBaseSource
- Parameters:
key
- Name of the gauge to remove.
-
incCounters
Description copied from interface:BaseSource
Add some amount to a counter.- Specified by:
incCounters
in interfaceBaseSource
- Parameters:
counterName
- the name of the counterdelta
- the amount to change the counter by.
-
updateHistogram
Description copied from interface:BaseSource
Add some value to a histogram.- Specified by:
updateHistogram
in interfaceBaseSource
- Parameters:
name
- the name of the histogramvalue
- the value to add to the histogram
-
getMetricsContext
Description copied from interface:BaseSource
Get the metrics context. For hadoop metrics2 system this is usually an all lowercased string. eg. regionserver, master, thriftserver- Specified by:
getMetricsContext
in interfaceBaseSource
- Returns:
- The string context used to register this source to hadoop's metrics2 system.
-
getMetricsDescription
Description copied from interface:BaseSource
Get the description of what this source exposes.- Specified by:
getMetricsDescription
in interfaceBaseSource
-
getMetricsJmxContext
Description copied from interface:BaseSource
Get the name of the context in JMX that this source will be exposed through. This is in ObjectName format. With the default context being Hadoop -> HBase- Specified by:
getMetricsJmxContext
in interfaceBaseSource
-
getMetricsName
Description copied from interface:BaseSource
Get the name of the metrics that are being exported by this source. Eg. IPC, GC, WAL- Specified by:
getMetricsName
in interfaceBaseSource
-