org.apache.hadoop.hdfs.server.blockmanagement

## Interface DatanodeStatistics

-     public interface DatanodeStatistics

  Datanode statistics

- - ### Method Summary

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

- - ### Method Detail

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

    - #### 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,org.apache.hadoop.hdfs.server.blockmanagement.StorageTypeStats> getStorageTypeStats()

      Returns:
        Storage Tier statistics

    - #### getProvidedCapacity

          long getProvidedCapacity()

      Returns:
        the provided capacity

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.