Class StorageStatistics

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

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

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
    org.apache.hadoop.fs.StorageStatistics.CommonStatisticNames
    These are common statistic names.
    static class 
    org.apache.hadoop.fs.StorageStatistics.LongStatistic
    A 64-bit storage statistic.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract Long
    Get the value of a statistic.
    abstract Iterator<org.apache.hadoop.fs.StorageStatistics.LongStatistic>
    Get an iterator over all the currently tracked long statistics.
    Get the name of this StorageStatistics object.
     
    abstract boolean
    Return true if a statistic is being tracked.
    abstract void
    Reset all the statistic data.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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<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.
      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.