MutableInverseQuantiles (Apache Hadoop Main 3.5.0 API)
Description: declaration: package: org.apache.hadoop.metrics2.lib, class: MutableInverseQuantiles

Package org.apache.hadoop.metrics2.lib

# Class MutableInverseQuantiles

java.lang.Object
org.apache.hadoop.metrics2.lib.MutableMetric
org.apache.hadoop.metrics2.lib.MutableQuantiles
org.apache.hadoop.metrics2.lib.MutableInverseQuantiles

@Public @Evolving public class MutableInverseQuantiles extends MutableQuantiles
Watches a stream of long values, maintaining online estimates of specific quantiles with provably low error bounds. Inverse quantiles are meant for highly accurate low-percentile (e.g. 1st, 5th) metrics. InverseQuantiles are used for metrics where higher the value better it is. ( eg: data transfer rate ). The 1st percentile here corresponds to the 99th inverse percentile metric, 5th percentile to 95th and so on.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final org.apache.hadoop.metrics2.util.Quantile[]`
  `INVERSE_QUANTILES`

  ### Fields inherited from class org.apache.hadoop.metrics2.lib.MutableQuantiles

  `previousSnapshot, QUANTILES`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MutableInverseQuantiles(String name, String description, String sampleName, String valueName, int intervalSecs)`
  Instantiates a new `MutableInverseQuantiles` for a metric that rolls itself over on the specified time interval.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `org.apache.hadoop.metrics2.util.Quantile[]`
  `getQuantiles()`
  Returns the array of Inverse Quantiles declared in MutableInverseQuantiles.

  ### Methods inherited from class org.apache.hadoop.metrics2.lib.MutableQuantiles

  `add, addQuantileInfo, getEstimator, getInterval, setEstimator, setInterval, setNumInfo, setQuantileInfos, snapshot, stop`

  ### Methods inherited from class org.apache.hadoop.metrics2.lib.MutableMetric

  `changed, clearChanged, setChanged, snapshot`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### INVERSE_QUANTILES

    @VisibleForTesting public static final org.apache.hadoop.metrics2.util.Quantile[] INVERSE_QUANTILES

- ## Constructor Details

  - ### MutableInverseQuantiles

    public MutableInverseQuantiles(String name, String description, String sampleName, String valueName, int intervalSecs)
    Instantiates a new `MutableInverseQuantiles` for a metric that rolls itself over on the specified time interval.
    Parameters:
      `name` - of the metric
      `description` - long-form textual description of the metric
      `sampleName` - type of items in the stream (e.g., "Ops")
      `valueName` - type of the values
      `intervalSecs` - rollover interval (in seconds) of the estimator

- ## Method Details

  - ### getQuantiles

    public org.apache.hadoop.metrics2.util.Quantile[] getQuantiles()
    Returns the array of Inverse Quantiles declared in MutableInverseQuantiles.
    Overrides:
      `getQuantiles` in class `MutableQuantiles`
    Returns:
      array of Inverse Quantiles