NamenodeStatusReport (Apache Hadoop HDFS-RBF 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.server.federation.resolver, class: NamenodeStatusReport

Package org.apache.hadoop.hdfs.server.federation.resolver

# Class NamenodeStatusReport

java.lang.Object
org.apache.hadoop.hdfs.server.federation.resolver.NamenodeStatusReport

public class NamenodeStatusReport extends Object
Status of the namenode.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `NamenodeStatusReport(String ns, String nn, String rpc, String service, String lifeline, String webScheme, String web)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `getAvailableSpace()`
  Get the available space.
  `String`
  `getBlockPoolId()`
  Get the block pool identifier.
  `String`
  `getClusterId()`
  Get the cluster identifier.
  `int`
  `getCorruptFilesCount()`
  Get the number of corrupt files.
  `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`
  `getLifelineAddress()`
  Get the Lifeline RPC address.
  `String`
  `getNamenodeId()`
  Get the namenode identifier.
  `String`
  `getNameserviceId()`
  Get the name service identifier.
  `long`
  `getNumberOfBadlyDistributedBlocks()`
  Gets the total number of badly distributed blocks.
  `long`
  `getNumberOfMissingBlocksWithReplicationFactorOne()`
  Gets the total number of missing blocks on the cluster with replication factor 1.
  `long`
  `getNumBlocks()`
  Get the number of blocks.
  `long`
  `getNumBlocksMissing()`
  Get the number of missing blocks.
  `int`
  `getNumDeadDatanodes()`
  Get the number of dead nodes.
  `int`
  `getNumDecomDeadDatanodes()`
  Get the number of dead decommissioned nodes.
  `int`
  `getNumDecomLiveDatanodes()`
  Get the number of live decommissioned nodes.
  `int`
  `getNumDecommissioningDatanodes()`
  Get the number of decommissionining nodes.
  `int`
  `getNumEnteringMaintenanceDataNodes()`
  Get the number of entering maintenance nodes.
  `long`
  `getNumFiles()`
  Get the number of files.
  `int`
  `getNumInMaintenanceDeadDataNodes()`
  Get the number of dead in maintenance nodes.
  `int`
  `getNumInMaintenanceLiveDataNodes()`
  Get the number of live in maintenance nodes.
  `int`
  `getNumLiveDatanodes()`
  Get the number of live blocks.
  `long`
  `getNumOfBlocksPendingDeletion()`
  Get the number of pending deletion blocks.
  `long`
  `getNumOfBlocksPendingReplication()`
  Get the number of pending replication blocks.
  `long`
  `getNumOfBlocksUnderReplicated()`
  Get the number of under replicated blocks.
  `int`
  `getNumStaleDatanodes()`
  Get the number of stale nodes.
  `int`
  `getPendingSPSPaths()`
  Returns the number of paths to be processed by storage policy satisfier.
  `long`
  `getProvidedSpace()`
  Get the space occupied by provided storage.
  `String`
  `getRpcAddress()`
  Get the RPC address.
  `boolean`
  `getSafemode()`
  `long`
  `getScheduledReplicationBlocks()`
  Blocks scheduled for replication.
  `String`
  `getServiceAddress()`
  Get the Service RPC address.
  `FederationNamenodeServiceState`
  `getState()`
  Get the state of the Namenode being monitored.
  `long`
  `getTotalSpace()`
  Get the total space.
  `String`
  `getWebAddress()`
  Get the web address.
  `String`
  `getWebScheme()`
  Get the scheme of web address.
  `boolean`
  `haStateValid()`
  If the HA state is valid.
  `boolean`
  `registrationValid()`
  If the registration is valid.
  `void`
  `setDatanodeInfo(int numLive, int numDead, int numStale, int numDecom, int numLiveDecom, int numDeadDecom, int numInMaintenanceLive, int numInMaintenanceDead, int numEnteringMaintenance, long numScheduledReplicationBlocks)`
  Set the datanode information.
  `void`
  `setHAServiceState(org.apache.hadoop.ha.HAServiceProtocol.HAServiceState state)`
  Set the HA service state.
  `void`
  `setNamenodeInfo(int numCorruptFiles, long numOfMissingBlocksWithReplicationFactorOne, long numOfBadlyDistributedBlocks, long highestPriorityLowRedundancyRepBlocks, long highPriorityLowRedundancyECBlocks)`
  Set the namenode blocks information.
  `void`
  `setNamespaceInfo(org.apache.hadoop.hdfs.server.protocol.NamespaceInfo info)`
  Set the namespace information.
  `void`
  `setNamesystemInfo(long available, long total, long numFiles, long numBlocks, long numBlocksMissing, long numBlocksPendingReplication, long numBlocksUnderReplicated, long numBlocksPendingDeletion, long providedStorageSpace, int numPendingSPSPaths)`
  Set the filesystem information.
  `void`
  `setRegistrationValid(boolean isValid)`
  Set the validity of registration.
  `void`
  `setSafeMode(boolean safemode)`
  `boolean`
  `statsValid()`
  If the statistics are valid.
  `String`
  `toString()`

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

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

- ## Constructor Details

  - ### NamenodeStatusReport

    public NamenodeStatusReport(String ns, String nn, String rpc, String service, String lifeline, String webScheme, String web)

- ## Method Details

  - ### statsValid

    public boolean statsValid()
    If the statistics are valid.
    Returns:
      If the statistics are valid.

  - ### registrationValid

    public boolean registrationValid()
    If the registration is valid.
    Returns:
      If the registration is valid.

  - ### haStateValid

    public boolean haStateValid()
    If the HA state is valid.
    Returns:
      If the HA state is valid.

  - ### getState

    public FederationNamenodeServiceState getState()
    Get the state of the Namenode being monitored.
    Returns:
      State of the Namenode.

  - ### getNameserviceId

    public String getNameserviceId()
    Get the name service identifier.
    Returns:
      The name service identifier.

  - ### getNamenodeId

    public String getNamenodeId()
    Get the namenode identifier.
    Returns:
      The namenode identifier.

  - ### getClusterId

    public String getClusterId()
    Get the cluster identifier.
    Returns:
      The cluster identifier.

  - ### getBlockPoolId

    public String getBlockPoolId()
    Get the block pool identifier.
    Returns:
      The block pool identifier.

  - ### getRpcAddress

    public String getRpcAddress()
    Get the RPC address.
    Returns:
      The RPC address.

  - ### getServiceAddress

    public String getServiceAddress()
    Get the Service RPC address.
    Returns:
      The Service RPC address.

  - ### getLifelineAddress

    public String getLifelineAddress()
    Get the Lifeline RPC address.
    Returns:
      The Lifeline RPC address.

  - ### getWebAddress

    public String getWebAddress()
    Get the web address.
    Returns:
      The web address.

  - ### getWebScheme

    public String getWebScheme()
    Get the scheme of web address.
    Returns:
      The scheme of web address.

  - ### setHAServiceState

    public void setHAServiceState(org.apache.hadoop.ha.HAServiceProtocol.HAServiceState state)
    Set the HA service state.
    Parameters:
      `state` - The HA service state to set.

  - ### setNamespaceInfo

    public void setNamespaceInfo(org.apache.hadoop.hdfs.server.protocol.NamespaceInfo info)
    Set the namespace information.
    Parameters:
      `info` - Namespace information.

  - ### setSafeMode

    public void setSafeMode(boolean safemode)

  - ### getSafemode

    public boolean getSafemode()

  - ### setDatanodeInfo

    public void setDatanodeInfo(int numLive, int numDead, int numStale, int numDecom, int numLiveDecom, int numDeadDecom, int numInMaintenanceLive, int numInMaintenanceDead, int numEnteringMaintenance, long numScheduledReplicationBlocks)
    Set the datanode information.
    Parameters:
      `numLive` - Number of live nodes.
      `numDead` - Number of dead nodes.
      `numStale` - Number of stale nodes.
      `numDecom` - Number of decommissioning nodes.
      `numLiveDecom` - Number of decommissioned live nodes.
      `numDeadDecom` - Number of decommissioned dead nodes.
      `numInMaintenanceLive` - Number of in maintenance live nodes.
      `numInMaintenanceDead` - Number of in maintenance dead nodes.
      `numEnteringMaintenance` - Number of entering maintenance nodes.
      `numScheduledReplicationBlocks` - Number of scheduled rep. blocks.

  - ### getNumLiveDatanodes

    public int getNumLiveDatanodes()
    Get the number of live blocks.
    Returns:
      The number of dead nodes.

  - ### getNumDeadDatanodes

    public int getNumDeadDatanodes()
    Get the number of dead nodes.
    Returns:
      The number of dead nodes.

  - ### getNumStaleDatanodes

    public int getNumStaleDatanodes()
    Get the number of stale nodes.
    Returns:
      The number of stale nodes.

  - ### getNumDecommissioningDatanodes

    public int getNumDecommissioningDatanodes()
    Get the number of decommissionining nodes.
    Returns:
      The number of decommissionining nodes.

  - ### getNumDecomLiveDatanodes

    public int getNumDecomLiveDatanodes()
    Get the number of live decommissioned nodes.
    Returns:
      The number of live decommissioned nodes.

  - ### getNumDecomDeadDatanodes

    public int getNumDecomDeadDatanodes()
    Get the number of dead decommissioned nodes.
    Returns:
      The number of dead decommissioned nodes.

  - ### getNumInMaintenanceLiveDataNodes

    public int getNumInMaintenanceLiveDataNodes()
    Get the number of live in maintenance nodes.
    Returns:
      The number of live in maintenance nodes.

  - ### getNumInMaintenanceDeadDataNodes

    public int getNumInMaintenanceDeadDataNodes()
    Get the number of dead in maintenance nodes.
    Returns:
      The number of dead in maintenance nodes.

  - ### getNumEnteringMaintenanceDataNodes

    public int getNumEnteringMaintenanceDataNodes()
    Get the number of entering maintenance nodes.
    Returns:
      The number of entering maintenance nodes.

  - ### setNamesystemInfo

    public void setNamesystemInfo(long available, long total, long numFiles, long numBlocks, long numBlocksMissing, long numBlocksPendingReplication, long numBlocksUnderReplicated, long numBlocksPendingDeletion, long providedStorageSpace, int numPendingSPSPaths)
    Set the filesystem information.
    Parameters:
      `available` - Available capacity.
      `total` - Total capacity.
      `numFiles` - Number of files.
      `numBlocks` - Total number of blocks.
      `numBlocksMissing` - Number of missing blocks.
      `numBlocksPendingReplication` - Number of blocks pending replication.
      `numBlocksUnderReplicated` - Number of blocks under replication.
      `numBlocksPendingDeletion` - Number of blocks pending deletion.
      `providedStorageSpace` - Space in provided storage.
      `numPendingSPSPaths` - The number of paths to be processed by storage policy satisfier.

  - ### setNamenodeInfo

    public void setNamenodeInfo(int numCorruptFiles, long numOfMissingBlocksWithReplicationFactorOne, long numOfBadlyDistributedBlocks, long highestPriorityLowRedundancyRepBlocks, long highPriorityLowRedundancyECBlocks)
    Set the namenode blocks information.
    Parameters:
      `numCorruptFiles` - number of corrupt files.
      `numOfMissingBlocksWithReplicationFactorOne` - number of missing blocks with rep one.
      `numOfBadlyDistributedBlocks` - number of badly distributed blocks
      `highestPriorityLowRedundancyRepBlocks` - number of high priority low redundancy rep blocks.
      `highPriorityLowRedundancyECBlocks` - number of high priority low redundancy EC blocks.

  - ### getCorruptFilesCount

    public int getCorruptFilesCount()
    Get the number of corrupt files.
    Returns:
      the total number of corrupt files

  - ### getScheduledReplicationBlocks

    public long getScheduledReplicationBlocks()
    Blocks scheduled for replication.
    Returns:
      - num of blocks scheduled for replication

  - ### getNumberOfMissingBlocksWithReplicationFactorOne

    public 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

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

  - ### getHighestPriorityLowRedundancyReplicatedBlocks

    public 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

    public 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.

  - ### getPendingSPSPaths

    public int getPendingSPSPaths()
    Returns the number of paths to be processed by storage policy satisfier.
    Returns:
      The number of paths to be processed by sps.

  - ### getNumBlocks

    public long getNumBlocks()
    Get the number of blocks.
    Returns:
      The number of blocks.

  - ### getNumFiles

    public long getNumFiles()
    Get the number of files.
    Returns:
      The number of files.

  - ### getTotalSpace

    public long getTotalSpace()
    Get the total space.
    Returns:
      The total space.

  - ### getAvailableSpace

    public long getAvailableSpace()
    Get the available space.
    Returns:
      The available space.

  - ### getProvidedSpace

    public long getProvidedSpace()
    Get the space occupied by provided storage.
    Returns:
      the provided capacity.

  - ### getNumBlocksMissing

    public long getNumBlocksMissing()
    Get the number of missing blocks.
    Returns:
      Number of missing blocks.

  - ### getNumOfBlocksPendingReplication

    public long getNumOfBlocksPendingReplication()
    Get the number of pending replication blocks.
    Returns:
      Number of pending replication blocks.

  - ### getNumOfBlocksUnderReplicated

    public long getNumOfBlocksUnderReplicated()
    Get the number of under replicated blocks.
    Returns:
      Number of under replicated blocks.

  - ### getNumOfBlocksPendingDeletion

    public long getNumOfBlocksPendingDeletion()
    Get the number of pending deletion blocks.
    Returns:
      Number of pending deletion blocks.

  - ### setRegistrationValid

    public void setRegistrationValid(boolean isValid)
    Set the validity of registration.
    Parameters:
      `isValid` - The desired value to be set.

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`