@InterfaceAudience.LimitedPrivate(value="Replication") public class MetricsSource extends Object implements BaseSource
HBASE_METRICS_SYSTEM_NAME| Constructor and Description |
|---|
MetricsSource(String id)
Constructor used to register the metrics
|
MetricsSource(String id,
MetricsReplicationSourceSource singleSourceSource,
MetricsReplicationSourceSource globalSourceSource)
Constructor for injecting custom (or test) MetricsReplicationSourceSources
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all metrics about this Source.
|
void |
decGauge(String gaugeName,
long delta) |
void |
decrSizeOfHFileRefsQueue(int size) |
void |
decrSizeOfLogQueue() |
Long |
getAgeOfLastShippedOp()
Get AgeOfLastShippedOp
|
String |
getMetricsContext() |
String |
getMetricsDescription() |
String |
getMetricsJmxContext() |
String |
getMetricsName() |
String |
getPeerID()
Get the slave peer ID
|
int |
getSizeOfLogQueue()
Get the sizeOfLogQueue
|
long |
getTimestampOfLastShippedOp()
Get the timestampsOfLastShippedOp, if there are multiple groups, return the latest one
|
long |
getTimeStampOfLastShippedOp()
Deprecated.
Since 2.0.0. Removed in 3.0.0.
|
void |
incCounters(String counterName,
long delta) |
void |
incGauge(String gaugeName,
long delta) |
void |
incrBytesSkippedInUncleanlyClosedWALs(long bytes) |
void |
incrCompletedRecoveryQueue() |
void |
incrCompletedWAL() |
void |
incrLogEditsFiltered()
The number of log edits filtered out.
|
void |
incrLogEditsFiltered(long delta)
Add on the number of log edits filtered
|
void |
incrLogEditsRead()
Increment the number of log edits read by one.
|
void |
incrLogReadInBytes(long readInBytes)
increase the byte number read by source from log file
|
void |
incrRepeatedFileBytes(long bytes) |
void |
incrRestartedWALReading() |
void |
incrSizeOfHFileRefsQueue(long size) |
void |
incrSizeOfLogQueue()
Increment size of the log queue.
|
void |
incrUncleanlyClosedWALs() |
void |
incrUnknownFileLengthForClosedWAL() |
void |
init() |
void |
refreshAgeOfLastShippedOp(String walGroupId)
Convenience method to use the last given timestamp to refresh the age of the last edit.
|
void |
removeMetric(String key) |
void |
setAgeOfLastShippedOp(long timestamp,
String walGroup)
Set the age of the last edit that was shipped
|
void |
setGauge(String gaugeName,
long value) |
void |
shipBatch(long batchSize,
int sizeInBytes)
Convience method to apply changes to metrics do to shipping a batch of logs.
|
void |
shipBatch(long batchSize,
int sizeInBytes,
long hfiles)
Convience method to apply changes to metrics do to shipping a batch of logs.
|
void |
updateHistogram(String name,
long value) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMetricRegistryInfopublic MetricsSource(String id)
id - Name of the source this class is monitoringpublic MetricsSource(String id, MetricsReplicationSourceSource singleSourceSource, MetricsReplicationSourceSource globalSourceSource)
id - Name of the source this class is monitoringsingleSourceSource - Class to monitor id-scoped metricsglobalSourceSource - Class to monitor global-scoped metricspublic void setAgeOfLastShippedOp(long timestamp,
String walGroup)
timestamp - write time of the editwalGroup - which group we are settingpublic void refreshAgeOfLastShippedOp(String walGroupId)
walGroupId - id of the group to updatepublic void incrSizeOfLogQueue()
public void decrSizeOfLogQueue()
public void incrLogEditsRead()
public void incrLogEditsFiltered(long delta)
delta - the number filtered.public void incrLogEditsFiltered()
public void shipBatch(long batchSize,
int sizeInBytes)
batchSize - the size of the batch that was shipped to sinks.public void shipBatch(long batchSize,
int sizeInBytes,
long hfiles)
batchSize - the size of the batch that was shipped to sinks.hfiles - total number of hfiles shipped to sinks.public void incrLogReadInBytes(long readInBytes)
public void clear()
public Long getAgeOfLastShippedOp()
public int getSizeOfLogQueue()
@Deprecated public long getTimeStampOfLastShippedOp()
getTimestampOfLastShippedOp()public long getTimestampOfLastShippedOp()
public String getPeerID()
public void incrSizeOfHFileRefsQueue(long size)
public void decrSizeOfHFileRefsQueue(int size)
public void incrUnknownFileLengthForClosedWAL()
public void incrUncleanlyClosedWALs()
public void incrBytesSkippedInUncleanlyClosedWALs(long bytes)
public void incrRestartedWALReading()
public void incrRepeatedFileBytes(long bytes)
public void incrCompletedWAL()
public void incrCompletedRecoveryQueue()
public void init()
init in interface BaseSourcepublic void setGauge(String gaugeName, long value)
setGauge in interface BaseSourcepublic void incGauge(String gaugeName, long delta)
incGauge in interface BaseSourcepublic void decGauge(String gaugeName, long delta)
decGauge in interface BaseSourcepublic void removeMetric(String key)
removeMetric in interface BaseSourcepublic void incCounters(String counterName, long delta)
incCounters in interface BaseSourcepublic void updateHistogram(String name, long value)
updateHistogram in interface BaseSourcepublic String getMetricsContext()
getMetricsContext in interface BaseSourcepublic String getMetricsDescription()
getMetricsDescription in interface BaseSourcepublic String getMetricsJmxContext()
getMetricsJmxContext in interface BaseSourcepublic String getMetricsName()
getMetricsName in interface BaseSourceCopyright © 2007–2018 The Apache Software Foundation. All rights reserved.