@InterfaceAudience.Private public class MetricsReplicationGlobalSourceSource extends Object implements MetricsReplicationSourceSource
SOURCE_AGE_OF_LAST_SHIPPED_OP, SOURCE_CLOSED_LOGS_WITH_UNKNOWN_LENGTH, SOURCE_COMPLETED_LOGS, SOURCE_COMPLETED_RECOVERY_QUEUES, SOURCE_FAILED_RECOVERY_QUEUES, 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
HBASE_METRICS_SYSTEM_NAME
Constructor and Description |
---|
MetricsReplicationGlobalSourceSource(MetricsReplicationSourceImpl rms) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
decGauge(String gaugeName,
long delta)
Subtract some amount from a gauge.
|
void |
decrSizeOfHFileRefsQueue(long size) |
void |
decrSizeOfLogQueue(int size) |
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.
|
int |
getSizeOfLogQueue() |
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 |
incrBatchesShipped(int batches) |
void |
incrBytesSkippedInUncleanlyClosedWALs(long bytes) |
void |
incrCompletedRecoveryQueue() |
void |
incrCompletedWAL() |
(package private) static void |
incrementKBsCounter(MutableFastCounter bytesCounter,
MutableFastCounter kbsCounter) |
void |
incrFailedRecoveryQueue() |
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 |
incrRestartedWALReading() |
void |
incrShippedBytes(long size) |
void |
incrSizeOfHFileRefsQueue(long size) |
void |
incrSizeOfLogQueue(int size) |
void |
incrUncleanlyClosedWALs() |
void |
incrUnknownFileLengthForClosedWAL() |
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 static final String KEY_PREFIX
private final MetricsReplicationSourceImpl rms
private final MutableHistogram ageOfLastShippedOpHist
private final org.apache.hadoop.metrics2.lib.MutableGaugeLong sizeOfLogQueueGauge
private final MutableFastCounter logReadInEditsCounter
private final MutableFastCounter logEditsFilteredCounter
private final MutableFastCounter shippedBatchesCounter
private final MutableFastCounter shippedOpsCounter
private final MutableFastCounter shippedBytesCounter
@Deprecated private final MutableFastCounter shippedKBsCounter
shippedBytesCounter
instead.private final MutableFastCounter logReadInBytesCounter
private final MutableFastCounter shippedHFilesCounter
private final org.apache.hadoop.metrics2.lib.MutableGaugeLong sizeOfHFileRefsQueueGauge
private final MutableFastCounter unknownFileLengthForClosedWAL
private final MutableFastCounter uncleanlyClosedWAL
private final MutableFastCounter uncleanlyClosedSkippedBytes
private final MutableFastCounter restartWALReading
private final MutableFastCounter repeatedFileBytes
private final MutableFastCounter completedWAL
private final MutableFastCounter completedRecoveryQueue
private final MutableFastCounter failedRecoveryQueue
public MetricsReplicationGlobalSourceSource(MetricsReplicationSourceImpl rms)
public void setLastShippedAge(long age)
setLastShippedAge
in interface MetricsReplicationSourceSource
public void incrSizeOfLogQueue(int size)
incrSizeOfLogQueue
in interface MetricsReplicationSourceSource
public void decrSizeOfLogQueue(int size)
decrSizeOfLogQueue
in interface MetricsReplicationSourceSource
public void incrLogReadInEdits(long size)
incrLogReadInEdits
in interface MetricsReplicationSourceSource
public void incrLogEditsFiltered(long size)
incrLogEditsFiltered
in interface MetricsReplicationSourceSource
public void incrBatchesShipped(int batches)
incrBatchesShipped
in interface MetricsReplicationSourceSource
public void incrOpsShipped(long ops)
incrOpsShipped
in interface MetricsReplicationSourceSource
public void incrShippedBytes(long size)
incrShippedBytes
in interface MetricsReplicationSourceSource
static void incrementKBsCounter(MutableFastCounter bytesCounter, MutableFastCounter kbsCounter)
public void incrLogReadInBytes(long size)
incrLogReadInBytes
in interface MetricsReplicationSourceSource
public void clear()
clear
in interface MetricsReplicationSourceSource
public long getLastShippedAge()
getLastShippedAge
in interface MetricsReplicationSourceSource
public void incrHFilesShipped(long hfiles)
incrHFilesShipped
in interface MetricsReplicationSourceSource
public void incrSizeOfHFileRefsQueue(long size)
incrSizeOfHFileRefsQueue
in interface MetricsReplicationSourceSource
public void decrSizeOfHFileRefsQueue(long size)
decrSizeOfHFileRefsQueue
in interface MetricsReplicationSourceSource
public int getSizeOfLogQueue()
getSizeOfLogQueue
in interface MetricsReplicationSourceSource
public void incrUnknownFileLengthForClosedWAL()
incrUnknownFileLengthForClosedWAL
in interface MetricsReplicationSourceSource
public void incrUncleanlyClosedWALs()
incrUncleanlyClosedWALs
in interface MetricsReplicationSourceSource
public void incrBytesSkippedInUncleanlyClosedWALs(long bytes)
incrBytesSkippedInUncleanlyClosedWALs
in interface MetricsReplicationSourceSource
public void incrRestartedWALReading()
incrRestartedWALReading
in interface MetricsReplicationSourceSource
public void incrRepeatedFileBytes(long bytes)
incrRepeatedFileBytes
in interface MetricsReplicationSourceSource
public void incrCompletedWAL()
incrCompletedWAL
in interface MetricsReplicationSourceSource
public void incrCompletedRecoveryQueue()
incrCompletedRecoveryQueue
in interface MetricsReplicationSourceSource
public void incrFailedRecoveryQueue()
incrFailedRecoveryQueue
in interface MetricsReplicationSourceSource
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.