Class NamenodeStatusReport
java.lang.Object
org.apache.hadoop.hdfs.server.federation.resolver.NamenodeStatusReport
Status of the namenode.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongGet the available space.Get the block pool identifier.Get the cluster identifier.intGet the number of corrupt files.longGets the total number of erasure coded low redundancy blocks on the cluster with the highest risk of loss.longGets the total number of replicated low redundancy blocks on the cluster with the highest risk of loss.Get the Lifeline RPC address.Get the namenode identifier.Get the name service identifier.longGets the total number of badly distributed blocks.longGets the total number of missing blocks on the cluster with replication factor 1.longGet the number of blocks.longGet the number of missing blocks.intGet the number of dead nodes.intGet the number of dead decommissioned nodes.intGet the number of live decommissioned nodes.intGet the number of decommissionining nodes.intGet the number of entering maintenance nodes.longGet the number of files.intGet the number of dead in maintenance nodes.intGet the number of live in maintenance nodes.intGet the number of live blocks.longGet the number of pending deletion blocks.longGet the number of pending replication blocks.longGet the number of under replicated blocks.intGet the number of stale nodes.intReturns the number of paths to be processed by storage policy satisfier.longGet the space occupied by provided storage.Get the RPC address.booleanlongBlocks scheduled for replication.Get the Service RPC address.getState()Get the state of the Namenode being monitored.longGet the total space.Get the web address.Get the scheme of web address.booleanIf the HA state is valid.booleanIf the registration is valid.voidsetDatanodeInfo(int numLive, int numDead, int numStale, int numDecom, int numLiveDecom, int numDeadDecom, int numInMaintenanceLive, int numInMaintenanceDead, int numEnteringMaintenance, long numScheduledReplicationBlocks) Set the datanode information.voidsetHAServiceState(org.apache.hadoop.ha.HAServiceProtocol.HAServiceState state) Set the HA service state.voidsetNamenodeInfo(int numCorruptFiles, long numOfMissingBlocksWithReplicationFactorOne, long numOfBadlyDistributedBlocks, long highestPriorityLowRedundancyRepBlocks, long highPriorityLowRedundancyECBlocks) Set the namenode blocks information.voidsetNamespaceInfo(org.apache.hadoop.hdfs.server.protocol.NamespaceInfo info) Set the namespace information.voidsetNamesystemInfo(long available, long total, long numFiles, long numBlocks, long numBlocksMissing, long numBlocksPendingReplication, long numBlocksUnderReplicated, long numBlocksPendingDeletion, long providedStorageSpace, int numPendingSPSPaths) Set the filesystem information.voidsetRegistrationValid(boolean isValid) Set the validity of registration.voidsetSafeMode(boolean safemode) booleanIf the statistics are valid.toString()
-
Constructor Details
-
NamenodeStatusReport
-
-
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
Get the state of the Namenode being monitored.- Returns:
- State of the Namenode.
-
getNameserviceId
Get the name service identifier.- Returns:
- The name service identifier.
-
getNamenodeId
Get the namenode identifier.- Returns:
- The namenode identifier.
-
getClusterId
Get the cluster identifier.- Returns:
- The cluster identifier.
-
getBlockPoolId
Get the block pool identifier.- Returns:
- The block pool identifier.
-
getRpcAddress
Get the RPC address.- Returns:
- The RPC address.
-
getServiceAddress
Get the Service RPC address.- Returns:
- The Service RPC address.
-
getLifelineAddress
Get the Lifeline RPC address.- Returns:
- The Lifeline RPC address.
-
getWebAddress
Get the web address.- Returns:
- The web address.
-
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 blockshighestPriorityLowRedundancyRepBlocks- 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
-