Class FileSystemStorageStatistics

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

@Private @Unstable public class FileSystemStorageStatistics extends StorageStatistics
A basic StorageStatistics instance which simply returns data from FileSystem#Statistics.
  • Method Details

    • getScheme

      public String getScheme()
      Overrides:
      getScheme in class StorageStatistics
      Returns:
      the associated file system scheme if this is scheme specific, else return null.
    • getLongStatistics

      public Iterator<StorageStatistics.LongStatistic> getLongStatistics()
      Description copied from class: StorageStatistics
      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.
      Specified by:
      getLongStatistics in class StorageStatistics
      Returns:
      LongStatistic Iterator.
    • getLong

      public Long getLong(String key)
      Description copied from class: StorageStatistics
      Get the value of a statistic.
      Specified by:
      getLong in class StorageStatistics
      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 boolean isTracked(String key)
      Return true if a statistic is being tracked.
      Specified by:
      isTracked in class StorageStatistics
      Parameters:
      key - key.
      Returns:
      True only if the statistic is being tracked.
    • reset

      public void reset()
      Description copied from class: StorageStatistics
      Reset all the statistic data.
      Specified by:
      reset in class StorageStatistics