Package org.apache.hadoop.fs
Class StorageStatistics
java.lang.Object
org.apache.hadoop.fs.StorageStatistics
StorageStatistics contains statistics data for a FileSystem or FileContext
instance.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceorg.apache.hadoop.fs.StorageStatistics.CommonStatisticNamesThese are common statistic names.static classorg.apache.hadoop.fs.StorageStatistics.LongStatisticA 64-bit storage statistic. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract LongGet the value of a statistic.abstract Iterator<org.apache.hadoop.fs.StorageStatistics.LongStatistic>Get an iterator over all the currently tracked long statistics.getName()Get the name of this StorageStatistics object.abstract booleanReturn true if a statistic is being tracked.abstract voidreset()Reset all the statistic data.
-
Constructor Details
-
StorageStatistics
-
-
Method Details
-
getName
Get the name of this StorageStatistics object.- Returns:
- name of this StorageStatistics object
-
getScheme
- Returns:
- the associated file system scheme if this is scheme specific, else return null.
-
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
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
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.
-