Enum Class GlobalStorageStatistics

java.lang.Object
java.lang.Enum<GlobalStorageStatistics>
org.apache.hadoop.fs.GlobalStorageStatistics
All Implemented Interfaces:
Serializable, Comparable<GlobalStorageStatistics>, Constable

@Public public enum GlobalStorageStatistics extends Enum<GlobalStorageStatistics>
Stores global storage statistics objects.
  • Enum Constant Details

  • Method Details

    • values

      public static GlobalStorageStatistics[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static GlobalStorageStatistics valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • get

      public StorageStatistics get(String name)
      Get the StorageStatistics object with the given name.
      Parameters:
      name - The storage statistics object name.
      Returns:
      The StorageStatistics object with the given name, or null if there is none.
    • put

      public StorageStatistics put(String name, org.apache.hadoop.fs.GlobalStorageStatistics.StorageStatisticsProvider provider)
      Create or return the StorageStatistics object with the given name.
      Parameters:
      name - The storage statistics object name.
      provider - An object which can create a new StorageStatistics object if needed.
      Returns:
      The StorageStatistics object with the given name.
      Throws:
      RuntimeException - If the StorageStatisticsProvider provides a null object or a new StorageStatistics object with the wrong name.
    • reset

      public void reset()
      Reset all global storage statistics.
    • iterator

      public Iterator<StorageStatistics> iterator()
      Get an iterator that we can use to iterate throw all the global storage statistics objects.
      Returns:
      StorageStatistics Iterator.