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

Package org.apache.hadoop.hdfs.server.namenode

# Interface NameNodeMXBean

All Known Implementing Classes:
  `FSNamesystem`

@Private @Stable public interface NameNodeMXBean
This is the JMX management interface for namenode information. End users shouldn't be implementing these interfaces, and instead access this information through the JMX APIs.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getBlockPoolId()`
  Gets the block pool id.
  `long`
  `getBlockPoolUsedSpace()`
  Get the total space used by the block pools of this namenode.
  `long`
  `getCacheCapacity()`
  Gets the total cache capacity of the datanode (in bytes).
  `long`
  `getCacheUsed()`
  Gets the amount of cache used by the datanode (in bytes).
  `String`
  `getClusterId()`
  Gets the cluster id.
  `String`
  `getCompileInfo()`
  Get the compilation information which contains date, user and branch.
  `String`
  `getCorruptFiles()`
  Get the list of corrupt files.
  `int`
  `getCorruptFilesCount()`
  Get the length of the list of corrupt files.
  `String`
  `getDeadNodes()`
  Gets the dead node information of the cluster.
  `String`
  `getDecomNodes()`
  Gets the decommissioning node information of the cluster.
  `int`
  `getDistinctVersionCount()`
  Get the number of distinct versions of live datanodes.
  `Map<String,Integer>`
  `getDistinctVersions()`
  Get the number of live datanodes for each distinct versions.
  `String`
  `getEnteringMaintenanceNodes()`
  Gets the information on nodes entering maintenance.
  `long`
  `getFree()`
  Gets total non-used raw bytes.
  `long`
  `getHighestPriorityLowRedundancyECBlocks()`
  Gets the total number of erasure coded low redundancy blocks on the cluster with the highest risk of loss.
  `long`
  `getHighestPriorityLowRedundancyReplicatedBlocks()`
  Gets the total number of replicated low redundancy blocks on the cluster with the highest risk of loss.
  `String`
  `getJournalTransactionInfo()`
  Get information about the transaction ID, including the last applied transaction ID and the most recent checkpoint's transaction ID.
  `String`
  `getLiveNodes()`
  Gets the live node information of the cluster.
  `String`
  `getNameDirSize()`
  Get namenode directory size.
  `String`
  `getNameDirStatuses()`
  Get status information about the directories storing image and edits logs of the NN.
  `String`
  `getNameJournalStatus()`
  Get status information about the journals of the NN.
  `long`
  `getNNStartedTimeInMillis()`
  Gets the NN start time in milliseconds.
  `String`
  `getNodeUsage()`
  Get Max, Median, Min and Standard Deviation of DataNodes usage.
  `long`
  `getNonDfsUsedSpace()`
  Gets total used space by data nodes for non DFS purposes such as storing temporary files on the local file system.
  `long`
  `getNumberOfBadlyDistributedBlocks()`
  Gets the total number of badly distributed blocks.
  `long`
  `getNumberOfMissingBlocks()`
  Gets the total number of missing blocks on the cluster.
  `long`
  `getNumberOfMissingBlocksWithReplicationFactorOne()`
  Gets the total number of missing blocks on the cluster with replication factor 1.
  `long`
  `getNumberOfSnapshottableDirs()`
  Gets the total number of snapshottable dirs in the system.
  `float`
  `getPercentBlockPoolUsed()`
  Get the total space used by the block pool as percentage of total capacity.
  `float`
  `getPercentRemaining()`
  Gets the total remaining space by data nodes as percentage of total capacity.
  `float`
  `getPercentUsed()`
  Gets the total used space by data nodes as percentage of total capacity.
  `long`
  `getProvidedCapacity()`
  Gets capacity of the provided storage mounted, in bytes.
  `org.apache.hadoop.hdfs.protocol.RollingUpgradeInfo.Bean`
  `getRollingUpgradeStatus()`
  Gets the RollingUpgrade information.
  `String`
  `getSafemode()`
  Gets the safemode status.
  `String`
  `getSoftwareVersion()`
  Get the version of software running on the Namenode.
  `int`
  `getThreads()`
  Gets the number of threads.
  `long`
  `getTotal()`
  Gets total raw bytes including non-dfs used space.
  `long`
  `getTotalBlocks()`
  Gets the total numbers of blocks on the cluster.
  `long`
  `getUsed()`
  Gets the used space by data nodes.
  `String`
  `getVerifyECWithTopologyResult()`
  Verifies whether the cluster setup can support all enabled EC policies.
  `String`
  `getVersion()`
  Gets the version of Hadoop.
  `boolean`
  `isUpgradeFinalized()`
  Checks if upgrade is finalized.

- ## Method Details

  - ### getVersion

    String getVersion()
    Gets the version of Hadoop.
    Returns:
      the version.

  - ### getSoftwareVersion

    String getSoftwareVersion()
    Get the version of software running on the Namenode.
    Returns:
      a string representing the version.

  - ### getUsed

    long getUsed()
    Gets the used space by data nodes.
    Returns:
      the used space by data nodes.

  - ### getFree

    long getFree()
    Gets total non-used raw bytes.
    Returns:
      total non-used raw bytes.

  - ### getTotal

    long getTotal()
    Gets total raw bytes including non-dfs used space.
    Returns:
      the total raw bytes including non-dfs used space.

  - ### getProvidedCapacity

    long getProvidedCapacity()
    Gets capacity of the provided storage mounted, in bytes.
    Returns:
      the total raw bytes present in the provided storage.

  - ### getSafemode

    String getSafemode()
    Gets the safemode status.
    Returns:
      the safemode status.

  - ### isUpgradeFinalized

    boolean isUpgradeFinalized()
    Checks if upgrade is finalized.
    Returns:
      true, if upgrade is finalized.

  - ### getRollingUpgradeStatus

    org.apache.hadoop.hdfs.protocol.RollingUpgradeInfo.Bean getRollingUpgradeStatus()
    Gets the RollingUpgrade information.
    Returns:
      Rolling upgrade information if an upgrade is in progress. Else (e.g. if there is no upgrade or the upgrade is finalized), returns null.

  - ### getNonDfsUsedSpace

    long getNonDfsUsedSpace()
    Gets total used space by data nodes for non DFS purposes such as storing temporary files on the local file system.
    Returns:
      the non dfs space of the cluster.

  - ### getPercentUsed

    float getPercentUsed()
    Gets the total used space by data nodes as percentage of total capacity.
    Returns:
      the percentage of used space on the cluster.

  - ### getPercentRemaining

    float getPercentRemaining()
    Gets the total remaining space by data nodes as percentage of total capacity.
    Returns:
      the percentage of the remaining space on the cluster.

  - ### getCacheUsed

    long getCacheUsed()
    Gets the amount of cache used by the datanode (in bytes).
    Returns:
      the amount of cache used by the datanode (in bytes).

  - ### getCacheCapacity

    long getCacheCapacity()
    Gets the total cache capacity of the datanode (in bytes).
    Returns:
      the total cache capacity of the datanode (in bytes).

  - ### getBlockPoolUsedSpace

    long getBlockPoolUsedSpace()
    Get the total space used by the block pools of this namenode.
    Returns:
      the total space used by the block pools of this namenode.

  - ### getPercentBlockPoolUsed

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

  - ### getTotalBlocks

    long getTotalBlocks()
    Gets the total numbers of blocks on the cluster.
    Returns:
      the total number of blocks of the cluster.

  - ### getNumberOfMissingBlocks

    long getNumberOfMissingBlocks()
    Gets the total number of missing blocks on the cluster.
    Returns:
      the total number of missing blocks on the cluster.

  - ### getNumberOfMissingBlocksWithReplicationFactorOne

    long getNumberOfMissingBlocksWithReplicationFactorOne()
    Gets the total number of missing blocks on the cluster with replication factor 1.
    Returns:
      the total number of missing blocks on the cluster with replication factor 1.

  - ### getNumberOfBadlyDistributedBlocks

    long getNumberOfBadlyDistributedBlocks()
    Gets the total number of badly distributed blocks.
    Returns:
      the total number of badly distrubted blocks.

  - ### getHighestPriorityLowRedundancyReplicatedBlocks

    long getHighestPriorityLowRedundancyReplicatedBlocks()
    Gets the total number of replicated low redundancy blocks on the cluster with the highest risk of loss.
    Returns:
      the total number of low redundancy blocks on the cluster with the highest risk of loss.

  - ### getHighestPriorityLowRedundancyECBlocks

    long getHighestPriorityLowRedundancyECBlocks()
    Gets the total number of erasure coded low redundancy blocks on the cluster with the highest risk of loss.
    Returns:
      the total number of low redundancy blocks on the cluster with the highest risk of loss.

  - ### getNumberOfSnapshottableDirs

    long getNumberOfSnapshottableDirs()
    Gets the total number of snapshottable dirs in the system.
    Returns:
      the total number of snapshottable dirs in the system.

  - ### getThreads

    int getThreads()
    Gets the number of threads.
    Returns:
      the number of threads.

  - ### getLiveNodes

    String getLiveNodes()
    Gets the live node information of the cluster.
    Returns:
      the live node information.

  - ### getDeadNodes

    String getDeadNodes()
    Gets the dead node information of the cluster.
    Returns:
      the dead node information.

  - ### getDecomNodes

    String getDecomNodes()
    Gets the decommissioning node information of the cluster.
    Returns:
      the decommissioning node information.

  - ### getEnteringMaintenanceNodes

    String getEnteringMaintenanceNodes()
    Gets the information on nodes entering maintenance.
    Returns:
      the information on nodes entering maintenance.

  - ### getClusterId

    String getClusterId()
    Gets the cluster id.
    Returns:
      the cluster id.

  - ### getBlockPoolId

    String getBlockPoolId()
    Gets the block pool id.
    Returns:
      the block pool id.

  - ### getNameDirStatuses

    String getNameDirStatuses()
    Get status information about the directories storing image and edits logs of the NN.
    Returns:
      the name dir status information, as a JSON string.

  - ### getNodeUsage

    String getNodeUsage()
    Get Max, Median, Min and Standard Deviation of DataNodes usage.
    Returns:
      the DataNode usage information, as a JSON string.

  - ### getNameJournalStatus

    String getNameJournalStatus()
    Get status information about the journals of the NN.
    Returns:
      the name journal status information, as a JSON string.

  - ### getJournalTransactionInfo

    String getJournalTransactionInfo()
    Get information about the transaction ID, including the last applied transaction ID and the most recent checkpoint's transaction ID.
    Returns:
      information about the transaction ID.

  - ### getNNStartedTimeInMillis

    long getNNStartedTimeInMillis()
    Gets the NN start time in milliseconds.
    Returns:
      the NN start time in msec.

  - ### getCompileInfo

    String getCompileInfo()
    Get the compilation information which contains date, user and branch.
    Returns:
      the compilation information, as a JSON string.

  - ### getCorruptFiles

    String getCorruptFiles()
    Get the list of corrupt files.
    Returns:
      the list of corrupt files, as a JSON string.

  - ### getCorruptFilesCount

    int getCorruptFilesCount()
    Get the length of the list of corrupt files.
    Returns:
      the length of the list of corrupt files.

  - ### getDistinctVersionCount

    int getDistinctVersionCount()
    Get the number of distinct versions of live datanodes.
    Returns:
      the number of distinct versions of live datanodes.

  - ### getDistinctVersions

    Map<String,Integer> getDistinctVersions()
    Get the number of live datanodes for each distinct versions.
    Returns:
      the number of live datanodes for each distinct versions.

  - ### getNameDirSize

    String getNameDirSize()
    Get namenode directory size.
    Returns:
      namenode directory size.

  - ### getVerifyECWithTopologyResult

    String getVerifyECWithTopologyResult()
    Verifies whether the cluster setup can support all enabled EC policies.
    Returns:
      the result of the verification.