Class StorageStatistics

java.lang.Object
org.apache.hadoop.fs.StorageStatistics
Direct Known Subclasses:
FileSystemStorageStatistics, StorageStatisticsFromIOStatistics, UnionStorageStatistics

@Public @Stable public abstract class StorageStatistics extends Object
StorageStatistics contains statistics data for a FileSystem or FileContext instance.
  • Constructor Details

    • StorageStatistics

      public StorageStatistics(String name)
  • Method Details

    • getName

      public String getName()
      Get the name of this StorageStatistics object.
      Returns:
      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<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.
      Returns:
      LongStatistic Iterator.
    • getLong

      public abstract Long getLong(String key)
      Get the value of a statistic.
      Parameters:
      key - key.
      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.
      Parameters:
      key - key.
      Returns:
      True only if the statistic is being tracked.
    • reset

      public abstract void reset()
      Reset all the statistic data.