Package org.apache.hadoop.fs
Enum Class GlobalStorageStatistics
- All Implemented Interfaces:
Serializable,Comparable<GlobalStorageStatistics>,Constable
Stores global storage statistics objects.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceorg.apache.hadoop.fs.GlobalStorageStatistics.StorageStatisticsProviderA callback API for creating new StorageStatistics instances.Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionGet the StorageStatistics object with the given name.iterator()Get an iterator that we can use to iterate throw all the global storage statistics objects.Create or return the StorageStatistics object with the given name.voidreset()Reset all global storage statistics.static GlobalStorageStatisticsReturns the enum constant of this class with the specified name.static GlobalStorageStatistics[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
The GlobalStorageStatistics singleton.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
get
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
Get an iterator that we can use to iterate throw all the global storage statistics objects.- Returns:
- StorageStatistics Iterator.
-