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
FieldsModifier and TypeFieldDescriptionprivate final MutableHistogramprivate final Stringprivate Stringprivate final MetricsReplicationSourceImplprivate final MutableFastCounterprivate final Stringprivate final StringFields inherited from interface org.apache.hadoop.hbase.metrics.BaseSource
HBASE_METRICS_SYSTEM_NAME -
Constructor Summary
ConstructorsConstructorDescriptionMetricsReplicationTableSourceImpl(MetricsReplicationSourceImpl rms, String tableName) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voidSubtract some amount from a gauge.longGet 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.longvoidincCounters(String counterName, long delta) Add some amount to a counter.voidAdd some amount to a gauge.voidincrShippedBytes(long size) voidinit()Clear out the metrics and re-prepare the source.voidremoveMetric(String key) Remove a metric and no longer announce it.voidSet a gauge to a specific value.voidsetLastShippedAge(long age) voidupdateHistogram(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, waitMethods 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:
setLastShippedAgein interfaceMetricsReplicationTableSource
-
incrShippedBytes
- Specified by:
incrShippedBytesin interfaceMetricsReplicationTableSource
-
clear
- Specified by:
clearin interfaceMetricsReplicationTableSource
-
getLastShippedAge
- Specified by:
getLastShippedAgein interfaceMetricsReplicationTableSource
-
getShippedBytes
- Specified by:
getShippedBytesin interfaceMetricsReplicationTableSource
-
init
Description copied from interface:BaseSourceClear out the metrics and re-prepare the source.- Specified by:
initin interfaceBaseSource
-
setGauge
Description copied from interface:BaseSourceSet a gauge to a specific value.- Specified by:
setGaugein interfaceBaseSource- Parameters:
gaugeName- the name of the gaugevalue- the value
-
incGauge
Description copied from interface:BaseSourceAdd some amount to a gauge.- Specified by:
incGaugein interfaceBaseSource- Parameters:
gaugeName- the name of the gaugedelta- the amount to change the gauge by.
-
decGauge
Description copied from interface:BaseSourceSubtract some amount from a gauge.- Specified by:
decGaugein interfaceBaseSource- Parameters:
gaugeName- the name of the gaugedelta- the amount to change the gauge by.
-
removeMetric
Description copied from interface:BaseSourceRemove a metric and no longer announce it.- Specified by:
removeMetricin interfaceBaseSource- Parameters:
key- Name of the gauge to remove.
-
incCounters
Description copied from interface:BaseSourceAdd some amount to a counter.- Specified by:
incCountersin interfaceBaseSource- Parameters:
counterName- the name of the counterdelta- the amount to change the counter by.
-
updateHistogram
Description copied from interface:BaseSourceAdd some value to a histogram.- Specified by:
updateHistogramin interfaceBaseSource- Parameters:
name- the name of the histogramvalue- the value to add to the histogram
-
getMetricsContext
Description copied from interface:BaseSourceGet the metrics context. For hadoop metrics2 system this is usually an all lowercased string. eg. regionserver, master, thriftserver- Specified by:
getMetricsContextin interfaceBaseSource- Returns:
- The string context used to register this source to hadoop's metrics2 system.
-
getMetricsDescription
Description copied from interface:BaseSourceGet the description of what this source exposes.- Specified by:
getMetricsDescriptionin interfaceBaseSource
-
getMetricsJmxContext
Description copied from interface:BaseSourceGet 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:
getMetricsJmxContextin interfaceBaseSource
-
getMetricsName
Description copied from interface:BaseSourceGet the name of the metrics that are being exported by this source. Eg. IPC, GC, WAL- Specified by:
getMetricsNamein interfaceBaseSource
-