|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.replication.regionserver.MetricsSource
@InterfaceAudience.LimitedPrivate(value="Replication") public class MetricsSource
This class is for maintaining the various replication statistics for a source and publishing them through the metrics interfaces.
| Field Summary | |
|---|---|
static org.apache.commons.logging.Log |
LOG
|
static String |
SOURCE_AGE_OF_LAST_SHIPPED_OP
|
static String |
SOURCE_LOG_EDITS_FILTERED
|
static String |
SOURCE_LOG_EDITS_READ
|
static String |
SOURCE_LOG_READ_IN_BYTES
|
static String |
SOURCE_SHIPPED_BATCHES
|
static String |
SOURCE_SHIPPED_KBS
|
static String |
SOURCE_SHIPPED_OPS
|
static String |
SOURCE_SIZE_OF_LOG_QUEUE
|
| Constructor Summary | |
|---|---|
MetricsSource(String id)
Constructor used to register the metrics |
|
| Method Summary | |
|---|---|
void |
clear()
Removes all metrics about this Source. |
Long |
getAgeOfLastShippedOp()
Get AgeOfLastShippedOp |
String |
getPeerID()
Get the slave peer ID |
int |
getSizeOfLogQueue()
Get the sizeOfLogQueue |
long |
getTimeStampOfLastShippedOp()
Get the timeStampsOfLastShippedOp |
void |
incrLogEditsFiltered()
The number of log edits filtered out. |
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 |
refreshAgeOfLastShippedOp()
Convenience method to use the last given timestamp to refresh the age of the last edit. |
void |
setAgeOfLastShippedOp(long timestamp)
Set the age of the last edit that was shipped |
void |
setSizeOfLogQueue(int size)
Set the size of the log queue |
void |
shipBatch(long batchSize,
int sizeInKB)
Convience method to apply changes to metrics do to shipping a batch of logs. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final org.apache.commons.logging.Log LOG
public static final String SOURCE_SIZE_OF_LOG_QUEUE
public static final String SOURCE_AGE_OF_LAST_SHIPPED_OP
public static final String SOURCE_LOG_EDITS_READ
public static final String SOURCE_LOG_EDITS_FILTERED
public static final String SOURCE_SHIPPED_BATCHES
public static final String SOURCE_SHIPPED_KBS
public static final String SOURCE_SHIPPED_OPS
public static final String SOURCE_LOG_READ_IN_BYTES
| Constructor Detail |
|---|
public MetricsSource(String id)
id - Name of the source this class is monitoring| Method Detail |
|---|
public void setAgeOfLastShippedOp(long timestamp)
timestamp - write time of the editpublic void refreshAgeOfLastShippedOp()
public void setSizeOfLogQueue(int size)
size - the size.public void incrLogEditsRead()
public void incrLogEditsFiltered()
public void shipBatch(long batchSize,
int sizeInKB)
batchSize - the size of the batch that was shipped to sinks.public void incrLogReadInBytes(long readInBytes)
public void clear()
public Long getAgeOfLastShippedOp()
public int getSizeOfLogQueue()
public long getTimeStampOfLastShippedOp()
public String getPeerID()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||