@InterfaceAudience.LimitedPrivate(value="Replication") public class MetricsSource extends Object
| Constructor and Description |
|---|
MetricsSource(String id)
Constructor used to register the metrics
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all metrics about this Source.
|
void |
decrSizeOfHFileRefsQueue(int size) |
void |
decrSizeOfLogQueue() |
Long |
getAgeOfLastShippedOp()
Get AgeOfLastShippedOp
|
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
|
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 |
refreshAgeOfLastShippedOp(String walGroupId)
Convenience method to use the last given timestamp to refresh the age of the last edit.
|
void |
setAgeOfLastShippedOp(long timestamp,
String walGroup)
Set the age of the last edit that was shipped
|
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.
|
public MetricsSource(String id)
id - Name of the source this class is monitoringpublic 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()
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()
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.