@InterfaceAudience.Private public class MetricsReplicationSourceSourceImpl 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_LOGSHBASE_METRICS_SYSTEM_NAME| Constructor and Description |
|---|
MetricsReplicationSourceSourceImpl(MetricsReplicationSourceImpl rms,
String id) |
| 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() |
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, waitgetMetricRegistryInfoprivate final MetricsReplicationSourceImpl rms
private final String sizeOfLogQueueKey
private final String ageOfLastShippedOpKey
private final String logReadInEditsKey
private final String logEditsFilteredKey
private final String shippedBatchesKey
private final String shippedOpsKey
@Deprecated private final String shippedKBsKey
shippedBytesKey instead.private final String shippedBytesKey
private final String logReadInBytesKey
private final String shippedHFilesKey
private final String sizeOfHFileRefsQueueKey
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 shippedKBsCounter
private final MutableFastCounter shippedBytesCounter
private final MutableFastCounter logReadInBytesCounter
private final MutableFastCounter shippedHFilesCounter
private final org.apache.hadoop.metrics2.lib.MutableGaugeLong sizeOfHFileRefsQueueGauge
private final String unknownFileLengthKey
private final String uncleanlyClosedKey
private final String uncleanlySkippedBytesKey
private final String restartedKey
private final String repeatedBytesKey
private final String completedLogsKey
private final String completedRecoveryKey
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
public MetricsReplicationSourceSourceImpl(MetricsReplicationSourceImpl rms, String id)
public void setLastShippedAge(long age)
setLastShippedAge in interface MetricsReplicationSourceSourcepublic void incrSizeOfLogQueue(int size)
incrSizeOfLogQueue in interface MetricsReplicationSourceSourcepublic void decrSizeOfLogQueue(int size)
decrSizeOfLogQueue in interface MetricsReplicationSourceSourcepublic void incrLogReadInEdits(long size)
incrLogReadInEdits in interface MetricsReplicationSourceSourcepublic void incrLogEditsFiltered(long size)
incrLogEditsFiltered in interface MetricsReplicationSourceSourcepublic void incrBatchesShipped(int batches)
incrBatchesShipped in interface MetricsReplicationSourceSourcepublic void incrOpsShipped(long ops)
incrOpsShipped in interface MetricsReplicationSourceSourcepublic void incrShippedBytes(long size)
incrShippedBytes in interface MetricsReplicationSourceSourcepublic void incrLogReadInBytes(long size)
incrLogReadInBytes in interface MetricsReplicationSourceSourcepublic void clear()
clear in interface MetricsReplicationSourceSourcepublic long getLastShippedAge()
getLastShippedAge in interface MetricsReplicationSourceSourcepublic void incrHFilesShipped(long hfiles)
incrHFilesShipped in interface MetricsReplicationSourceSourcepublic void incrSizeOfHFileRefsQueue(long size)
incrSizeOfHFileRefsQueue in interface MetricsReplicationSourceSourcepublic void decrSizeOfHFileRefsQueue(long size)
decrSizeOfHFileRefsQueue in interface MetricsReplicationSourceSourcepublic int getSizeOfLogQueue()
getSizeOfLogQueue in interface MetricsReplicationSourceSourcepublic void incrUnknownFileLengthForClosedWAL()
incrUnknownFileLengthForClosedWAL in interface MetricsReplicationSourceSourcepublic void incrUncleanlyClosedWALs()
incrUncleanlyClosedWALs in interface MetricsReplicationSourceSourcepublic void incrBytesSkippedInUncleanlyClosedWALs(long bytes)
incrBytesSkippedInUncleanlyClosedWALs in interface MetricsReplicationSourceSourcepublic void incrRestartedWALReading()
incrRestartedWALReading in interface MetricsReplicationSourceSourcepublic void incrRepeatedFileBytes(long bytes)
incrRepeatedFileBytes in interface MetricsReplicationSourceSourcepublic void incrCompletedWAL()
incrCompletedWAL in interface MetricsReplicationSourceSourcepublic void incrCompletedRecoveryQueue()
incrCompletedRecoveryQueue in interface MetricsReplicationSourceSourcepublic void incrFailedRecoveryQueue()
incrFailedRecoveryQueue in interface MetricsReplicationSourceSourcepublic void init()
BaseSourceinit in interface BaseSourcepublic void setGauge(String gaugeName, long value)
BaseSourcesetGauge in interface BaseSourcegaugeName - the name of the gaugevalue - the valuepublic void incGauge(String gaugeName, long delta)
BaseSourceincGauge in interface BaseSourcegaugeName - the name of the gaugedelta - the amount to change the gauge by.public void decGauge(String gaugeName, long delta)
BaseSourcedecGauge in interface BaseSourcegaugeName - the name of the gaugedelta - the amount to change the gauge by.public void removeMetric(String key)
BaseSourceremoveMetric in interface BaseSourcekey - Name of the gauge to remove.public void incCounters(String counterName, long delta)
BaseSourceincCounters in interface BaseSourcecounterName - the name of the counterdelta - the amount to change the counter by.public void updateHistogram(String name, long value)
BaseSourceupdateHistogram in interface BaseSourcename - the name of the histogramvalue - the value to add to the histogrampublic String getMetricsContext()
BaseSourcegetMetricsContext in interface BaseSourcepublic String getMetricsDescription()
BaseSourcegetMetricsDescription in interface BaseSourcepublic String getMetricsJmxContext()
BaseSourcegetMetricsJmxContext in interface BaseSourcepublic String getMetricsName()
BaseSourcegetMetricsName in interface BaseSourceCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.