MetricsIntValue (Hadoop 1.2.1 API)
Date: 2013-07-22

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.metrics.util
Class MetricsIntValue

    java.lang.Object
      org.apache.hadoop.metrics.util.MetricsBase
          org.apache.hadoop.metrics.util.MetricsIntValue

Deprecated. in favor of `MetricMutableGaugeInt`.

    @Deprecated
    @InterfaceAudience.LimitedPrivate(value={"HDFS","MapReduce"})
    public class MetricsIntValue

extends MetricsBase

The MetricsIntValue class is for a metric that is not time varied but changes only when it is set. Each time its value is set, it is published only *once* at the next update call.

Field Summary

Fields inherited from class org.apache.hadoop.metrics.util.MetricsBase
`NO_DESCRIPTION`

Constructor Summary
`MetricsIntValue(String nam, MetricsRegistry registry)` Deprecated. Constructor - create a new metric
`MetricsIntValue(String nam, MetricsRegistry registry, String description)` Deprecated. Constructor - create a new metric

Method Summary
`int` | `get()` Deprecated. Get value
`void` | `pushMetric(MetricsRecord mr)` Deprecated. Push the metric to the mr.
`void` | `set(int newValue)` Deprecated. Set the value

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

### MetricsIntValue

    public MetricsIntValue(String nam,
                           MetricsRegistry registry,
                           String description)

  Deprecated.
  Constructor - create a new metric

  Parameters:
    `nam` - the name of the metrics to be used to publish the metric
    `registry` - - where the metrics object will be registered

### MetricsIntValue

    public MetricsIntValue(String nam,
                           MetricsRegistry registry)

  Deprecated.
  Constructor - create a new metric

  Parameters:
    `nam` - the name of the metrics to be used to publish the metric
    `registry` - - where the metrics object will be registered A description of `MetricsBase.NO_DESCRIPTION` is used

Method Detail

### set

    public void set(int newValue)

  Deprecated.
  Set the value

  Parameters:
    `newValue` -

### get

    public int get()

  Deprecated.
  Get value

  Returns:
    the value last set

### pushMetric

    public void pushMetric(MetricsRecord mr)

  Deprecated.
  Push the metric to the mr. The metric is pushed only if it was updated since last push Note this does NOT push to JMX (JMX gets the info via `get()`

  Specified by:
    `pushMetric` in class `MetricsBase`
  Parameters:
    `mr` -

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation