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:
  • 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.