|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.metrics.util.MetricsBase
org.apache.hadoop.metrics.util.MetricsTimeVaryingRate
org.apache.hadoop.hbase.metrics.PersistentMetricsTimeVaryingRate
public class PersistentMetricsTimeVaryingRate
This class extends MetricsTimeVaryingRate to let the metrics persist past a pushMetric() call
| Field Summary | |
|---|---|
protected long |
lastOper
|
protected static org.apache.commons.logging.Log |
LOG
|
protected boolean |
reset
|
protected long |
totalOps
|
| Fields inherited from class org.apache.hadoop.metrics.util.MetricsBase |
|---|
NO_DESCRIPTION |
| Constructor Summary | |
|---|---|
PersistentMetricsTimeVaryingRate(String nam,
org.apache.hadoop.metrics.util.MetricsRegistry registry)
Constructor - create a new metric |
|
PersistentMetricsTimeVaryingRate(String nam,
org.apache.hadoop.metrics.util.MetricsRegistry registry,
String description)
Constructor - create a new metric |
|
| Method Summary | |
|---|---|
void |
inc(int numOps,
long time)
Increment the metrics for numOps operations |
void |
inc(long time)
Increment the metrics for numOps operations |
protected void |
maintainStats()
|
void |
pushMetric(org.apache.hadoop.metrics.MetricsRecord mr)
Push updated metrics to the mr. |
void |
resetMinMaxAvg()
Rollover to a new interval NOTE: does not reset numOps. |
| Methods inherited from class org.apache.hadoop.metrics.util.MetricsTimeVaryingRate |
|---|
getMaxTime, getMinTime, getPreviousIntervalAverageTime, getPreviousIntervalNumOps, resetMinMax |
| Methods inherited from class org.apache.hadoop.metrics.util.MetricsBase |
|---|
getDescription, getName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.commons.logging.Log LOG
protected boolean reset
protected long lastOper
protected long totalOps
| Constructor Detail |
|---|
public PersistentMetricsTimeVaryingRate(String nam,
org.apache.hadoop.metrics.util.MetricsRegistry registry,
String description)
nam - the name of the metrics to be used to publish the metricregistry - - where the metrics object will be registereddescription - metrics description
public PersistentMetricsTimeVaryingRate(String nam,
org.apache.hadoop.metrics.util.MetricsRegistry registry)
nam - the name of the metrics to be used to publish the metricregistry - - where the metrics object will be registered| Method Detail |
|---|
public void pushMetric(org.apache.hadoop.metrics.MetricsRecord mr)
MetricsTimeVaryingRate.getPreviousIntervalAverageTime() and
MetricsTimeVaryingRate.getPreviousIntervalNumOps()
pushMetric in class org.apache.hadoop.metrics.util.MetricsTimeVaryingRatemr - owner of this metric
public void inc(int numOps,
long time)
inc in class org.apache.hadoop.metrics.util.MetricsTimeVaryingRatenumOps - - number of operationstime - - time for numOps operationspublic void inc(long time)
inc in class org.apache.hadoop.metrics.util.MetricsTimeVaryingRatetime - - time for numOps operationspublic void resetMinMaxAvg()
protected void maintainStats()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||