@InterfaceAudience.LimitedPrivate(value="Replication") public class MetricsSource extends Object implements BaseSource
HBASE_METRICS_SYSTEM_NAME| 构造器和说明 |
|---|
MetricsSource(String id)
Constructor used to register the metrics
|
MetricsSource(String id,
MetricsReplicationSourceSource singleSourceSource,
MetricsReplicationSourceSource globalSourceSource,
Map<String,MetricsReplicationSourceSource> singleSourceSourceByTable)
Constructor for injecting custom (or test) MetricsReplicationSourceSources
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear()
Removes all metrics about this Source.
|
void |
decGauge(String gaugeName,
long delta) |
void |
decrSizeOfHFileRefsQueue(int size) |
void |
decrSizeOfLogQueue() |
Long |
getAgeOfLastShippedOp()
Get AgeOfLastShippedOp
|
long |
getAgeofLastShippedOp(String walGroup)
get age of last shipped op of given wal group.
|
long |
getLastTimeStampOfWalGroup(String walGroup)
get the last timestamp of given wal group.
|
String |
getMetricsContext() |
String |
getMetricsDescription() |
String |
getMetricsJmxContext() |
String |
getMetricsName() |
String |
getPeerID()
Get the slave peer ID
|
Map<String,MetricsReplicationSourceSource> |
getSingleSourceSourceByTable() |
int |
getSizeOfLogQueue()
Get the sizeOfLogQueue
|
long |
getTimestampOfLastShippedOp()
Get the timestampsOfLastShippedOp, if there are multiple groups, return the latest one
|
long |
getTimeStampOfLastShippedOp()
已过时。
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 |
incrFailedRecoveryQueue() |
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 |
setAgeOfLastShippedOpByTable(long timestamp,
String tableName)
Set the age of the last edit that was shipped group by table
|
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, Map<String,MetricsReplicationSourceSource> singleSourceSourceByTable)
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 setAgeOfLastShippedOpByTable(long timestamp,
String tableName)
timestamp - write time of the edittableName - String as group and tableNamepublic long getLastTimeStampOfWalGroup(String walGroup)
walGroup - which group we are gettingpublic long getAgeofLastShippedOp(String walGroup)
walGroup - which group we are gettingpublic 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 incrFailedRecoveryQueue()
public void init()
init 在接口中 BaseSourcepublic void setGauge(String gaugeName, long value)
setGauge 在接口中 BaseSourcepublic void incGauge(String gaugeName, long delta)
incGauge 在接口中 BaseSourcepublic void decGauge(String gaugeName, long delta)
decGauge 在接口中 BaseSourcepublic void removeMetric(String key)
removeMetric 在接口中 BaseSourcepublic void incCounters(String counterName, long delta)
incCounters 在接口中 BaseSourcepublic void updateHistogram(String name, long value)
updateHistogram 在接口中 BaseSourcepublic String getMetricsContext()
getMetricsContext 在接口中 BaseSourcepublic String getMetricsDescription()
getMetricsDescription 在接口中 BaseSourcepublic String getMetricsJmxContext()
getMetricsJmxContext 在接口中 BaseSourcepublic String getMetricsName()
getMetricsName 在接口中 BaseSourcepublic Map<String,MetricsReplicationSourceSource> getSingleSourceSourceByTable()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.