java.lang.Comparable<DatanodeID>, org.apache.hadoop.net.NodeDatanodeInfoWithStorage@Private @Evolving public class DatanodeInfo extends DatanodeID implements org.apache.hadoop.net.Node
| Modifier and Type | Class | Description |
|---|---|---|
static class |
DatanodeInfo.AdminStates |
|
static class |
DatanodeInfo.DatanodeInfoBuilder |
Building the DataNodeInfo.
|
| Modifier and Type | Field | Description |
|---|---|---|
protected DatanodeInfo.AdminStates |
adminState |
|
static DatanodeInfo[] |
EMPTY_ARRAY |
EMPTY_DATANODE_ID| Modifier | Constructor | Description |
|---|---|---|
protected |
DatanodeInfo(DatanodeID nodeID) |
|
protected |
DatanodeInfo(DatanodeID nodeID,
java.lang.String location) |
|
protected |
DatanodeInfo(DatanodeInfo from) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addDependentHostName(java.lang.String hostname) |
Add a hostname to a list of network dependencies
|
java.lang.String |
dumpDatanode() |
A formatted string for printing the status of the DataNode.
|
boolean |
equals(java.lang.Object obj) |
|
DatanodeInfo.AdminStates |
getAdminState() |
Retrieves the admin state of this node.
|
long |
getBlockPoolUsed() |
The used space by the block pool on data node.
|
float |
getBlockPoolUsedPercent() |
Used space by the block pool as percentage of present capacity
|
long |
getCacheCapacity() |
|
long |
getCacheRemaining() |
|
float |
getCacheRemainingPercent() |
|
long |
getCacheUsed() |
|
float |
getCacheUsedPercent() |
|
long |
getCapacity() |
The raw capacity.
|
java.lang.String |
getDatanodeReport() |
A formatted string for reporting the status of the DataNode.
|
java.util.List<java.lang.String> |
getDependentHostNames() |
List of Network dependencies
|
long |
getDfsUsed() |
The used space by the data node.
|
float |
getDfsUsedPercent() |
The used space by the data node as percentage of present capacity
|
long |
getLastBlockReportMonotonic() |
Last block report monotonic time.
|
long |
getLastBlockReportTime() |
Last block report time.
|
long |
getLastUpdate() |
Get the last update timestamp.
|
long |
getLastUpdateMonotonic() |
The time when this information was accurate.
|
int |
getLevel() |
Return this node's level in the tree.
|
long |
getMaintenanceExpireTimeInMS() |
|
java.lang.String |
getName() |
Network location name.
|
java.lang.String |
getNetworkLocation() |
network location
|
long |
getNonDfsUsed() |
The used space by the data node.
|
int |
getNumBlocks() |
|
org.apache.hadoop.net.Node |
getParent() |
Return this node's parent
|
long |
getRemaining() |
The raw free space.
|
float |
getRemainingPercent() |
The remaining space as percentage of configured capacity.
|
java.lang.String |
getSoftwareVersion() |
|
java.lang.String |
getUpgradeDomain() |
upgrade domain
|
int |
getXceiverCount() |
number of active connections
|
int |
hashCode() |
|
boolean |
isDecommissioned() |
Returns true if the node has been decommissioned.
|
boolean |
isDecommissionInProgress() |
Returns true if the node is in the process of being decommissioned
|
boolean |
isEnteringMaintenance() |
Returns true if the node is is entering_maintenance
|
boolean |
isInMaintenance() |
Returns true if the node is in maintenance
|
boolean |
isInService() |
|
boolean |
isMaintenance() |
Returns true if the node is entering or in maintenance
|
boolean |
isStale(long staleInterval) |
Check if the datanode is in stale state.
|
boolean |
maintenanceExpired() |
|
static boolean |
maintenanceNotExpired(long maintenanceExpireTimeInMS) |
|
protected void |
setAdminState(DatanodeInfo.AdminStates newState) |
Sets the admin state of this node.
|
void |
setBlockPoolUsed(long bpUsed) |
Sets block pool used space
|
void |
setCacheCapacity(long cacheCapacity) |
Sets cache capacity.
|
void |
setCacheUsed(long cacheUsed) |
Sets cache used.
|
void |
setCapacity(long capacity) |
Sets raw capacity.
|
void |
setDecommissioned() |
Sets the admin state to indicate that decommission is complete.
|
void |
setDependentHostNames(java.util.List<java.lang.String> dependencyList) |
Sets the network dependencies
|
void |
setDfsUsed(long dfsUsed) |
Sets the used space for the datanode.
|
void |
setInMaintenance() |
Put a node directly to maintenance mode.
|
void |
setLastBlockReportMonotonic(long lastBlockReportMonotonic) |
Sets the last block report monotonic time.
|
void |
setLastBlockReportTime(long lastBlockReportTime) |
Sets the last block report time.
|
void |
setLastUpdate(long lastUpdate) |
Sets time when this information was accurate.
|
void |
setLastUpdateMonotonic(long lastUpdateMonotonic) |
Set lastUpdate monotonic time
|
void |
setLevel(int level) |
|
void |
setMaintenanceExpireTimeInMS(long maintenanceExpireTimeInMS) |
|
void |
setNetworkLocation(java.lang.String location) |
Sets the network location
|
void |
setNonDfsUsed(long nonDfsUsed) |
Sets the nondfs-used space for the datanode.
|
void |
setNumBlocks(int blockCount) |
Sets number of blocks.
|
void |
setParent(org.apache.hadoop.net.Node parent) |
|
void |
setRemaining(long remaining) |
Sets raw free space.
|
void |
setSoftwareVersion(java.lang.String softwareVersion) |
|
void |
setUpgradeDomain(java.lang.String upgradeDomain) |
Sets the upgrade domain
|
void |
setXceiverCount(int xceiverCount) |
Sets number of active connections
|
void |
startDecommission() |
Start decommissioning a node.
|
void |
startMaintenance() |
Start the maintenance operation.
|
void |
stopDecommission() |
Stop decommissioning a node.
|
void |
stopMaintenance() |
Take the node out of maintenance mode.
|
compareTo, getDatanodeUuid, getDatanodeUuidBytes, getHostName, getHostNameBytes, getInfoAddr, getInfoPort, getInfoSecureAddr, getInfoSecurePort, getIpAddr, getIpAddrBytes, getIpcAddr, getIpcPort, getPeerHostName, getResolvedAddress, getXferAddr, getXferAddr, getXferAddrWithHostname, getXferPort, setIpAddr, setPeerHostName, toString, updateRegInfopublic static final DatanodeInfo[] EMPTY_ARRAY
protected DatanodeInfo.AdminStates adminState
protected DatanodeInfo(DatanodeInfo from)
protected DatanodeInfo(DatanodeID nodeID)
protected DatanodeInfo(DatanodeID nodeID, java.lang.String location)
public java.lang.String getName()
getName in interface org.apache.hadoop.net.Nodepublic long getCapacity()
public long getDfsUsed()
public long getBlockPoolUsed()
public long getNonDfsUsed()
public float getDfsUsedPercent()
public long getRemaining()
public float getBlockPoolUsedPercent()
public float getRemainingPercent()
public long getCacheCapacity()
public long getCacheUsed()
public float getCacheUsedPercent()
public long getCacheRemaining()
public float getCacheRemainingPercent()
public long getLastUpdate()
public long getLastUpdateMonotonic()
public int getNumBlocks()
public void setLastUpdateMonotonic(long lastUpdateMonotonic)
public int getXceiverCount()
public void setCapacity(long capacity)
public void setDfsUsed(long dfsUsed)
public void setNonDfsUsed(long nonDfsUsed)
public void setRemaining(long remaining)
public void setBlockPoolUsed(long bpUsed)
public void setCacheCapacity(long cacheCapacity)
public void setCacheUsed(long cacheUsed)
public void setLastUpdate(long lastUpdate)
public void setXceiverCount(int xceiverCount)
public void setNumBlocks(int blockCount)
public java.lang.String getNetworkLocation()
getNetworkLocation in interface org.apache.hadoop.net.Nodepublic void setNetworkLocation(java.lang.String location)
setNetworkLocation in interface org.apache.hadoop.net.Nodepublic void setUpgradeDomain(java.lang.String upgradeDomain)
public java.lang.String getUpgradeDomain()
public void addDependentHostName(java.lang.String hostname)
public java.util.List<java.lang.String> getDependentHostNames()
public void setDependentHostNames(java.util.List<java.lang.String> dependencyList)
public java.lang.String getDatanodeReport()
public java.lang.String dumpDatanode()
public void startDecommission()
public void stopDecommission()
public boolean isDecommissionInProgress()
public boolean isDecommissioned()
public void setDecommissioned()
public void startMaintenance()
public void setInMaintenance()
public void setMaintenanceExpireTimeInMS(long maintenanceExpireTimeInMS)
maintenanceExpireTimeInMS - the time that the DataNode is in the
maintenance mode until in the unit of milliseconds.public long getMaintenanceExpireTimeInMS()
public void setLastBlockReportTime(long lastBlockReportTime)
public void setLastBlockReportMonotonic(long lastBlockReportMonotonic)
public long getLastBlockReportTime()
public long getLastBlockReportMonotonic()
public void stopMaintenance()
public static boolean maintenanceNotExpired(long maintenanceExpireTimeInMS)
public boolean isEnteringMaintenance()
public boolean isInMaintenance()
public boolean isMaintenance()
public boolean maintenanceExpired()
public boolean isInService()
public DatanodeInfo.AdminStates getAdminState()
public boolean isStale(long staleInterval)
staleInterval - the time interval for marking the node as stale. If the last
update time is beyond the given time interval, the node will be
marked as stale.protected void setAdminState(DatanodeInfo.AdminStates newState)
public org.apache.hadoop.net.Node getParent()
getParent in interface org.apache.hadoop.net.Nodepublic void setParent(org.apache.hadoop.net.Node parent)
setParent in interface org.apache.hadoop.net.Nodepublic int getLevel()
getLevel in interface org.apache.hadoop.net.Nodepublic void setLevel(int level)
setLevel in interface org.apache.hadoop.net.Nodepublic int hashCode()
hashCode in class DatanodeIDpublic boolean equals(java.lang.Object obj)
equals in class DatanodeIDpublic java.lang.String getSoftwareVersion()
public void setSoftwareVersion(java.lang.String softwareVersion)
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.