org.apache.hadoop.fs

## Class StorageStatistics

- java.lang.Object
- - org.apache.hadoop.fs.StorageStatistics

-     @InterfaceAudience.Public
      public abstract class StorageStatistics
      extends Object

  StorageStatistics contains statistics data for a FileSystem or FileContext instance.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StorageStatistics(String name)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract Long` | `getLong(String key)` Get the value of a statistic.
    `abstract Iterator<org.apache.hadoop.fs.StorageStatistics.LongStatistic>` | `getLongStatistics()` Get an iterator over all the currently tracked long statistics.
    `String` | `getName()` Get the name of this StorageStatistics object.
    `String` | `getScheme()`
    `abstract boolean` | `isTracked(String key)` Return true if a statistic is being tracked.
    `abstract void` | `reset()` Reset all the statistic data.

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

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

- - ### Constructor Detail

    - #### StorageStatistics

          public StorageStatistics(String name)

  - ### Method Detail

    - #### getName

          public String getName()

      Get the name of this StorageStatistics object.

    - #### getScheme

          public String getScheme()

      Returns:
        the associated file system scheme if this is scheme specific, else return null.

    - #### getLongStatistics

          public abstract Iterator<org.apache.hadoop.fs.StorageStatistics.LongStatistic> getLongStatistics()

      Get an iterator over all the currently tracked long statistics. The values returned will depend on the type of FileSystem or FileContext object. The values do not necessarily reflect a snapshot in time.

    - #### getLong

          public abstract Long getLong(String key)

      Get the value of a statistic.
      Returns:
        null if the statistic is not being tracked or is not a long statistic. The value of the statistic, otherwise.

    - #### isTracked

          public abstract boolean isTracked(String key)

      Return true if a statistic is being tracked.
      Returns:
        True only if the statistic is being tracked.

    - #### reset

          public abstract void reset()

      Reset all the statistic data.

Copyright © 2022 Apache Software Foundation. All rights reserved.