UnionStorageStatistics (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.fs, class: UnionStorageStatistics

Package org.apache.hadoop.fs

# Class UnionStorageStatistics

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

@Private @Unstable public class UnionStorageStatistics extends StorageStatistics
A StorageStatistics instance which combines the outputs of several other StorageStatistics instances.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.apache.hadoop.fs.StorageStatistics

  `StorageStatistics.CommonStatisticNames, StorageStatistics.LongStatistic`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `UnionStorageStatistics(String name, StorageStatistics[] stats)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Long`
  `getLong(String key)`
  Get the value of a statistic.
  `Iterator<StorageStatistics.LongStatistic>`
  `getLongStatistics()`
  Get an iterator over all the currently tracked long statistics.
  `boolean`
  `isTracked(String key)`
  Return true if a statistic is being tracked.
  `void`
  `reset()`
  Reset all the statistic data.

  ### Methods inherited from class org.apache.hadoop.fs.StorageStatistics

  `getName, getScheme`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### UnionStorageStatistics

    public UnionStorageStatistics(String name, StorageStatistics[] stats)

- ## Method Details

  - ### 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`