DurationStatisticSummary (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.fs.statistics, class: DurationStatisticSummary

Package org.apache.hadoop.fs.statistics

# Class DurationStatisticSummary

java.lang.Object
org.apache.hadoop.fs.statistics.DurationStatisticSummary

All Implemented Interfaces:
  `Serializable`

@Public @Unstable public final class DurationStatisticSummary extends Object implements Serializable
Summary of duration tracking statistics as extracted from an IOStatistics instance.

This is for reporting and testing.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DurationStatisticSummary(String key, boolean success, long count, long max, long min, MeanStatistic mean)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static DurationStatisticSummary`
  `fetchDurationSummary(IOStatistics source, String key, boolean success)`
  Fetch the duration timing summary of success or failure operations from an IO Statistics source.
  `static DurationStatisticSummary`
  `fetchSuccessSummary(IOStatistics source, String key)`
  Fetch the duration timing summary from an IOStatistics source.
  `long`
  `getCount()`
  `String`
  `getKey()`
  `long`
  `getMax()`
  `MeanStatistic`
  `getMean()`
  `long`
  `getMin()`
  `boolean`
  `isSuccess()`
  `String`
  `toString()`

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

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

- ## Constructor Details

  - ### DurationStatisticSummary

    public DurationStatisticSummary(String key, boolean success, long count, long max, long min, @Nullable MeanStatistic mean)
    Constructor.
    Parameters:
      `key` - Statistic key.
      `success` - Are these success or failure statistics.
      `count` - Count of operation invocations.
      `max` - Max duration; -1 if unknown.
      `min` - Min duration; -1 if unknown.
      `mean` - Mean duration -may be null. (will be cloned)

- ## Method Details

  - ### getKey

    public String getKey()

  - ### isSuccess

    public boolean isSuccess()

  - ### getCount

    public long getCount()

  - ### getMax

    public long getMax()

  - ### getMin

    public long getMin()

  - ### getMean

    public MeanStatistic getMean()

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### fetchDurationSummary

    public static DurationStatisticSummary fetchDurationSummary(IOStatistics source, String key, boolean success)
    Fetch the duration timing summary of success or failure operations from an IO Statistics source. If the duration key is unknown, the summary will be incomplete.
    Parameters:
      `source` - source of data
      `key` - duration statistic key
      `success` - fetch success statistics, or if false, failure stats.
    Returns:
      a summary of the statistics.

  - ### fetchSuccessSummary

    public static DurationStatisticSummary fetchSuccessSummary(IOStatistics source, String key)
    Fetch the duration timing summary from an IOStatistics source. If the duration key is unknown, the summary will be incomplete.
    Parameters:
      `source` - source of data
      `key` - duration statistic key
    Returns:
      a summary of the statistics.