DatanodeStatistics (Apache Hadoop HDFS 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.server.blockmanagement, interface: DatanodeStatistics

Package org.apache.hadoop.hdfs.server.blockmanagement

# Interface DatanodeStatistics

public interface DatanodeStatistics
Datanode statistics

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `getBlockPoolUsed()`
  `long`
  `getCacheCapacity()`
  `long`
  `getCacheUsed()`
  `long`
  `getCapacityRemaining()`
  `float`
  `getCapacityRemainingPercent()`
  `long`
  `getCapacityTotal()`
  `long`
  `getCapacityUsed()`
  `long`
  `getCapacityUsedNonDFS()`
  `float`
  `getCapacityUsedPercent()`
  `int`
  `getExpiredHeartbeats()`
  `int`
  `getInServiceAvailableVolumeCount()`
  `int`
  `getInServiceXceiverCount()`
  `int`
  `getNumDatanodesInService()`
  `float`
  `getPercentBlockPoolUsed()`
  `long`
  `getProvidedCapacity()`
  `long[]`
  `getStats()`
  The same as `ClientProtocol.getStats()`.
  `Map<org.apache.hadoop.fs.StorageType,StorageTypeStats>`
  `getStorageTypeStats()`
  `int`
  `getXceiverCount()`

- ## Method Details

  - ### getCapacityTotal

    long getCapacityTotal()
    Returns:
      the total capacity

  - ### getCapacityUsed

    long getCapacityUsed()
    Returns:
      the used capacity

  - ### getCapacityUsedPercent

    float getCapacityUsedPercent()
    Returns:
      the percentage of the used capacity over the total capacity.

  - ### getCapacityRemaining

    long getCapacityRemaining()
    Returns:
      the remaining capacity

  - ### getCapacityRemainingPercent

    float getCapacityRemainingPercent()
    Returns:
      the percentage of the remaining capacity over the total capacity.

  - ### getBlockPoolUsed

    long getBlockPoolUsed()
    Returns:
      the block pool used.

  - ### getPercentBlockPoolUsed

    float getPercentBlockPoolUsed()
    Returns:
      the percentage of the block pool used space over the total capacity.

  - ### getCacheCapacity

    long getCacheCapacity()
    Returns:
      the total cache capacity of all DataNodes

  - ### getCacheUsed

    long getCacheUsed()
    Returns:
      the total cache used by all DataNodes

  - ### getXceiverCount

    int getXceiverCount()
    Returns:
      the xceiver count

  - ### getInServiceXceiverCount

    int getInServiceXceiverCount()
    Returns:
      average xceiver count for non-decommission(ing|ed) nodes

  - ### getNumDatanodesInService

    int getNumDatanodesInService()
    Returns:
      number of non-decommission(ing|ed) nodes

  - ### getInServiceAvailableVolumeCount

    int getInServiceAvailableVolumeCount()
    Returns:
      average xceiver count for writable volumes.

  - ### getCapacityUsedNonDFS

    long getCapacityUsedNonDFS()
    Returns:
      the total used space by data nodes for non-DFS purposes such as storing temporary files on the local file system

  - ### getStats

    long[] getStats()
    The same as `ClientProtocol.getStats()`. The block related entries are set to -1.

  - ### getExpiredHeartbeats

    int getExpiredHeartbeats()
    Returns:
      the expired heartbeats

  - ### getStorageTypeStats

    Map<org.apache.hadoop.fs.StorageType,StorageTypeStats> getStorageTypeStats()
    Returns:
      Storage Tier statistics

  - ### getProvidedCapacity

    long getProvidedCapacity()
    Returns:
      the provided capacity