Class MetricsReplicationGlobalSourceSourceImpl
java.lang.Object
org.apache.hadoop.hbase.replication.regionserver.MetricsReplicationGlobalSourceSourceImpl
- All Implemented Interfaces:
BaseSource
,MetricsReplicationGlobalSourceSource
,MetricsReplicationSourceSource
@Private
public class MetricsReplicationGlobalSourceSourceImpl
extends Object
implements MetricsReplicationGlobalSourceSource
-
Field Summary
Modifier and TypeFieldDescriptionprivate final MutableHistogram
private final MutableFastCounter
private final MutableFastCounter
private final MutableFastCounter
private final MutableFastCounter
private static final String
private final MutableFastCounter
private final MutableFastCounter
private final MutableFastCounter
private final MutableFastCounter
private final MetricsReplicationSourceImpl
private final MutableFastCounter
private final MutableFastCounter
private final MutableFastCounter
private final MutableFastCounter
Deprecated.since 1.3.0.private final MutableFastCounter
private final org.apache.hadoop.metrics2.lib.MutableGaugeLong
private final org.apache.hadoop.metrics2.lib.MutableGaugeLong
private final org.apache.hadoop.metrics2.lib.MutableGaugeInt
private final MutableFastCounter
private final MutableFastCounter
private final MutableFastCounter
private final MutableFastCounter
private final org.apache.hadoop.metrics2.lib.MutableGaugeLong
Fields inherited from interface org.apache.hadoop.hbase.metrics.BaseSource
HBASE_METRICS_SYSTEM_NAME
Fields inherited from interface org.apache.hadoop.hbase.replication.regionserver.MetricsReplicationGlobalSourceSource
SOURCE_WAL_READER_EDITS_BUFFER
Fields inherited from interface org.apache.hadoop.hbase.replication.regionserver.MetricsReplicationSourceSource
SOURCE_AGE_OF_LAST_SHIPPED_OP, SOURCE_CLOSED_LOGS_WITH_UNKNOWN_LENGTH, SOURCE_COMPLETED_LOGS, SOURCE_COMPLETED_RECOVERY_QUEUES, SOURCE_FAILED_BATCHES, SOURCE_FAILED_RECOVERY_QUEUES, SOURCE_INITIALIZING, SOURCE_LOG_EDITS_FILTERED, SOURCE_LOG_READ_IN_BYTES, SOURCE_LOG_READ_IN_EDITS, SOURCE_REPEATED_LOG_FILE_BYTES, SOURCE_RESTARTED_LOG_READING, SOURCE_SHIPPED_BATCHES, SOURCE_SHIPPED_BYTES, SOURCE_SHIPPED_HFILES, SOURCE_SHIPPED_KBS, SOURCE_SHIPPED_OPS, SOURCE_SIZE_OF_HFILE_REFS_QUEUE, SOURCE_SIZE_OF_LOG_QUEUE, SOURCE_UNCLEANLY_CLOSED_IGNORED_IN_BYTES, SOURCE_UNCLEANLY_CLOSED_LOGS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
void
Subtract some amount from a gauge.void
decrSizeOfHFileRefsQueue
(long size) void
decrSizeOfLogQueue
(int size) void
long
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
long
int
int
long
long
long
Returns the size, in bytes, of edits held in memory to be replicated across all peers.void
incCounters
(String counterName, long delta) Add some amount to a counter.void
Add some amount to a gauge.void
incrBatchesShipped
(int batches) void
incrBytesSkippedInUncleanlyClosedWALs
(long bytes) void
void
(package private) static void
incrementKBsCounter
(MutableFastCounter bytesCounter, MutableFastCounter kbsCounter) void
void
void
incrHFilesShipped
(long hfiles) void
incrLogEditsFiltered
(long size) void
incrLogReadInBytes
(long size) void
incrLogReadInEdits
(long size) void
incrOpsShipped
(long ops) void
incrRepeatedFileBytes
(long bytes) void
void
incrShippedBytes
(long size) void
incrSizeOfHFileRefsQueue
(long size) void
incrSizeOfLogQueue
(int size) void
void
void
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
setOldestWalAge
(long age) void
setWALReaderEditsBufferBytes
(long usage) Sets the total usage of memory used by edits in memory read from WALs.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
-
KEY_PREFIX
- See Also:
-
rms
-
ageOfLastShippedOpHist
-
sizeOfLogQueueGauge
-
logReadInEditsCounter
-
walEditsFilteredCounter
-
shippedBatchesCounter
-
failedBatchesCounter
-
shippedOpsCounter
-
shippedBytesCounter
-
shippedKBsCounter
Deprecated.since 1.3.0. UseshippedBytesCounter
instead. -
logReadInBytesCounter
-
shippedHFilesCounter
-
sizeOfHFileRefsQueueGauge
-
unknownFileLengthForClosedWAL
-
uncleanlyClosedWAL
-
uncleanlyClosedSkippedBytes
-
restartWALReading
-
repeatedFileBytes
-
completedWAL
-
completedRecoveryQueue
-
failedRecoveryQueue
-
walReaderBufferUsageBytes
-
sourceInitializing
-
-
Constructor Details
-
MetricsReplicationGlobalSourceSourceImpl
-
-
Method Details
-
setLastShippedAge
- Specified by:
setLastShippedAge
in interfaceMetricsReplicationSourceSource
-
incrSizeOfLogQueue
- Specified by:
incrSizeOfLogQueue
in interfaceMetricsReplicationSourceSource
-
decrSizeOfLogQueue
- Specified by:
decrSizeOfLogQueue
in interfaceMetricsReplicationSourceSource
-
incrLogReadInEdits
- Specified by:
incrLogReadInEdits
in interfaceMetricsReplicationSourceSource
-
incrLogEditsFiltered
- Specified by:
incrLogEditsFiltered
in interfaceMetricsReplicationSourceSource
-
incrBatchesShipped
- Specified by:
incrBatchesShipped
in interfaceMetricsReplicationSourceSource
-
incrFailedBatches
- Specified by:
incrFailedBatches
in interfaceMetricsReplicationSourceSource
-
incrOpsShipped
- Specified by:
incrOpsShipped
in interfaceMetricsReplicationSourceSource
-
incrShippedBytes
- Specified by:
incrShippedBytes
in interfaceMetricsReplicationSourceSource
-
incrementKBsCounter
-
incrLogReadInBytes
- Specified by:
incrLogReadInBytes
in interfaceMetricsReplicationSourceSource
-
clear
- Specified by:
clear
in interfaceMetricsReplicationSourceSource
-
getLastShippedAge
- Specified by:
getLastShippedAge
in interfaceMetricsReplicationSourceSource
-
incrHFilesShipped
- Specified by:
incrHFilesShipped
in interfaceMetricsReplicationSourceSource
-
incrSizeOfHFileRefsQueue
- Specified by:
incrSizeOfHFileRefsQueue
in interfaceMetricsReplicationSourceSource
-
decrSizeOfHFileRefsQueue
- Specified by:
decrSizeOfHFileRefsQueue
in interfaceMetricsReplicationSourceSource
-
getSizeOfLogQueue
- Specified by:
getSizeOfLogQueue
in interfaceMetricsReplicationSourceSource
-
incrUnknownFileLengthForClosedWAL
- Specified by:
incrUnknownFileLengthForClosedWAL
in interfaceMetricsReplicationSourceSource
-
incrUncleanlyClosedWALs
- Specified by:
incrUncleanlyClosedWALs
in interfaceMetricsReplicationSourceSource
-
getUncleanlyClosedWALs
- Specified by:
getUncleanlyClosedWALs
in interfaceMetricsReplicationSourceSource
-
incrBytesSkippedInUncleanlyClosedWALs
- Specified by:
incrBytesSkippedInUncleanlyClosedWALs
in interfaceMetricsReplicationSourceSource
-
incrRestartedWALReading
- Specified by:
incrRestartedWALReading
in interfaceMetricsReplicationSourceSource
-
incrRepeatedFileBytes
- Specified by:
incrRepeatedFileBytes
in interfaceMetricsReplicationSourceSource
-
incrCompletedWAL
- Specified by:
incrCompletedWAL
in interfaceMetricsReplicationSourceSource
-
incrCompletedRecoveryQueue
- Specified by:
incrCompletedRecoveryQueue
in interfaceMetricsReplicationSourceSource
-
incrFailedRecoveryQueue
- Specified by:
incrFailedRecoveryQueue
in interfaceMetricsReplicationSourceSource
-
setOldestWalAge
- Specified by:
setOldestWalAge
in interfaceMetricsReplicationSourceSource
-
getOldestWalAge
- Specified by:
getOldestWalAge
in interfaceMetricsReplicationSourceSource
-
incrSourceInitializing
- Specified by:
incrSourceInitializing
in interfaceMetricsReplicationSourceSource
-
decrSourceInitializing
- Specified by:
decrSourceInitializing
in interfaceMetricsReplicationSourceSource
-
getSourceInitializing
- Specified by:
getSourceInitializing
in interfaceMetricsReplicationSourceSource
-
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
-
getWALEditsRead
- Specified by:
getWALEditsRead
in interfaceMetricsReplicationSourceSource
-
getShippedOps
- Specified by:
getShippedOps
in interfaceMetricsReplicationSourceSource
-
getEditsFiltered
- Specified by:
getEditsFiltered
in interfaceMetricsReplicationSourceSource
-
setWALReaderEditsBufferBytes
Description copied from interface:MetricsReplicationGlobalSourceSource
Sets the total usage of memory used by edits in memory read from WALs. The memory represented by this usage measure is across peers/sources. For example, we may batch the same WAL edits multiple times for the sake of replicating them to multiple peers..- Specified by:
setWALReaderEditsBufferBytes
in interfaceMetricsReplicationGlobalSourceSource
- Parameters:
usage
- The memory used by edits in bytes
-
getWALReaderEditsBufferBytes
Description copied from interface:MetricsReplicationGlobalSourceSource
Returns the size, in bytes, of edits held in memory to be replicated across all peers.- Specified by:
getWALReaderEditsBufferBytes
in interfaceMetricsReplicationGlobalSourceSource
-