org.apache.hadoop.hbase.replication.regionserver
Class MetricsSink
java.lang.Object
org.apache.hadoop.hbase.replication.regionserver.MetricsSink
@InterfaceAudience.Private
public class MetricsSink
- extends Object
This class is for maintaining the various replication statistics for a sink and publishing them
through the metrics interfaces.
Method Summary |
void |
applyBatch(long batchSize)
Convience method to change metrics when a batch of operations are applied. |
long |
refreshAgeOfLastAppliedOp()
Refreshing the age makes sure the value returned is the actual one and
not the one set a replication time |
long |
setAgeOfLastAppliedOp(long timestamp)
Set the age of the last applied operation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SINK_AGE_OF_LAST_APPLIED_OP
public static final String SINK_AGE_OF_LAST_APPLIED_OP
- See Also:
- Constant Field Values
SINK_APPLIED_BATCHES
public static final String SINK_APPLIED_BATCHES
- See Also:
- Constant Field Values
SINK_APPLIED_OPS
public static final String SINK_APPLIED_OPS
- See Also:
- Constant Field Values
MetricsSink
public MetricsSink()
setAgeOfLastAppliedOp
public long setAgeOfLastAppliedOp(long timestamp)
- Set the age of the last applied operation
- Parameters:
timestamp
- The timestamp of the last operation applied.
- Returns:
- the age that was set
refreshAgeOfLastAppliedOp
public long refreshAgeOfLastAppliedOp()
- Refreshing the age makes sure the value returned is the actual one and
not the one set a replication time
- Returns:
- refreshed age
applyBatch
public void applyBatch(long batchSize)
- Convience method to change metrics when a batch of operations are applied.
- Parameters:
batchSize
-
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.