|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.metrics.util.MetricsBase org.apache.hadoop.metrics.util.MetricsTimeVaryingRate
MetricMutableGauge
.
@Deprecated @InterfaceAudience.LimitedPrivate(value={"HDFS","MapReduce"}) public class MetricsTimeVaryingRate
The MetricsTimeVaryingRate class is for a rate based metric that naturally varies over time (e.g. time taken to create a file). The rate is averaged at each interval heart beat (the interval is set in the metrics config file). This class also keeps track of the min and max rates along with a method to reset the min-max.
Field Summary |
---|
Fields inherited from class org.apache.hadoop.metrics.util.MetricsBase |
---|
NO_DESCRIPTION |
Constructor Summary | |
---|---|
MetricsTimeVaryingRate(String nam,
MetricsRegistry registry)
Deprecated. Constructor - create a new metric |
|
MetricsTimeVaryingRate(String nam,
MetricsRegistry registry,
String description)
Deprecated. Constructor - create a new metric |
Method Summary | |
---|---|
long |
getMaxTime()
Deprecated. The max time for a single operation since the last reset resetMinMax() |
long |
getMinTime()
Deprecated. The min time for a single operation since the last reset resetMinMax() |
long |
getPreviousIntervalAverageTime()
Deprecated. The average rate of an operation in the previous interval |
int |
getPreviousIntervalNumOps()
Deprecated. The number of operations in the previous interval |
void |
inc(int numOps,
long time)
Deprecated. Increment the metrics for numOps operations |
void |
inc(long time)
Deprecated. Increment the metrics for one operation |
void |
pushMetric(MetricsRecord mr)
Deprecated. Push the delta metrics to the mr. |
void |
resetMinMax()
Deprecated. Reset the min max values |
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 |
Constructor Detail |
---|
public MetricsTimeVaryingRate(String nam, MetricsRegistry registry, String description)
nam
- the name of the metrics to be used to publish the metricregistry
- - where the metrics object will be registeredpublic MetricsTimeVaryingRate(String nam, MetricsRegistry registry)
nam
- the name of the metrics to be used to publish the metricregistry
- - where the metrics object will be registered
A description of MetricsBase.NO_DESCRIPTION
is usedMethod Detail |
---|
public void inc(int numOps, long time)
numOps
- - number of operationstime
- - time for numOps operationspublic void inc(long time)
time
- for one operationpublic void pushMetric(MetricsRecord mr)
getPreviousIntervalAverageTime()
and
getPreviousIntervalNumOps()
pushMetric
in class MetricsBase
mr
- public int getPreviousIntervalNumOps()
public long getPreviousIntervalAverageTime()
public long getMinTime()
resetMinMax()
public long getMaxTime()
resetMinMax()
public void resetMinMax()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |