|
||||||||||
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.MetricsTimeVaryingInt
MetricMutableCounterInt
.
@Deprecated @InterfaceAudience.LimitedPrivate(value={"HDFS","MapReduce"}) public class MetricsTimeVaryingInt
The MetricsTimeVaryingInt class is for a metric that naturally varies over time (e.g. number of files created). The metrics is accumulated over an interval (set in the metrics config file); the metrics is published at the end of each interval and then reset to zero. Hence the counter has the value in the current interval. Note if one wants a time associated with the metric then use
MetricsTimeVaryingRate
Field Summary |
---|
Fields inherited from class org.apache.hadoop.metrics.util.MetricsBase |
---|
NO_DESCRIPTION |
Constructor Summary | |
---|---|
MetricsTimeVaryingInt(String nam,
MetricsRegistry registry)
Deprecated. Constructor - create a new metric |
|
MetricsTimeVaryingInt(String nam,
MetricsRegistry registry,
String description)
Deprecated. Constructor - create a new metric |
Method Summary | |
---|---|
int |
getCurrentIntervalValue()
Deprecated. The Value at the current interval |
int |
getPreviousIntervalValue()
Deprecated. The Value at the Previous interval |
void |
inc()
Deprecated. Inc metrics by one |
void |
inc(int incr)
Deprecated. Inc metrics for incr vlaue |
void |
pushMetric(MetricsRecord mr)
Deprecated. Push the delta metrics to the mr. |
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 MetricsTimeVaryingInt(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 registereddescription
- - the descriptionpublic MetricsTimeVaryingInt(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 incr)
incr
- - number of operationspublic void inc()
public void pushMetric(MetricsRecord mr)
previousIntervalValue
pushMetric
in class MetricsBase
mr
- public int getPreviousIntervalValue()
public int getCurrentIntervalValue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |