|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hdfs.protocol.DatanodeID
org.apache.hadoop.hdfs.protocol.DatanodeInfo
org.apache.hadoop.hdfs.server.namenode.DatanodeDescriptor
@InterfaceAudience.Private public class DatanodeDescriptor
DatanodeDescriptor tracks stats on a given DataNode, such as available storage capacity, last update time, etc., and maintains a set of blocks stored on the datanode. This data structure is internal to the namenode. It is *not* sent over-the-wire to the Client or the Datanodes. Neither is it stored persistently in the fsImage.
Nested Class Summary | |
---|---|
static class |
DatanodeDescriptor.BlockTargetPair
Block and targets pair |
Nested classes/interfaces inherited from class org.apache.hadoop.hdfs.protocol.DatanodeInfo |
---|
DatanodeInfo.AdminStates |
Field Summary | |
---|---|
protected boolean |
isAlive
|
protected boolean |
needKeyUpdate
|
Fields inherited from class org.apache.hadoop.hdfs.protocol.DatanodeInfo |
---|
adminState, capacity, dfsUsed, hostName, lastUpdate, location, remaining, xceiverCount |
Fields inherited from class org.apache.hadoop.hdfs.protocol.DatanodeID |
---|
EMPTY_ARRAY, infoPort, ipcPort, name, storageID |
Constructor Summary | |
---|---|
DatanodeDescriptor()
Default constructor |
|
DatanodeDescriptor(DatanodeID nodeID)
DatanodeDescriptor constructor |
|
DatanodeDescriptor(DatanodeID nodeID,
long capacity,
long dfsUsed,
long remaining,
int xceiverCount,
int failedVolumes)
DatanodeDescriptor constructor |
|
DatanodeDescriptor(DatanodeID nodeID,
String networkLocation)
DatanodeDescriptor constructor |
|
DatanodeDescriptor(DatanodeID nodeID,
String networkLocation,
String hostName)
DatanodeDescriptor constructor |
|
DatanodeDescriptor(DatanodeID nodeID,
String networkLocation,
String hostName,
long capacity,
long dfsUsed,
long remaining,
int xceiverCount,
int failedVolumes)
DatanodeDescriptor constructor |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
int |
getBlocksScheduled()
|
int |
getVolumeFailures()
|
int |
hashCode()
|
int |
numBlocks()
|
void |
updateRegInfo(DatanodeID nodeReg)
Update fields when a new registration request comes in. |
Methods inherited from class org.apache.hadoop.hdfs.protocol.DatanodeInfo |
---|
dumpDatanode, getCapacity, getDatanodeReport, getDfsUsed, getDfsUsedPercent, getHostName, getLastUpdate, getLevel, getNetworkLocation, getNonDfsUsed, getParent, getRemaining, getRemainingPercent, getXceiverCount, isDecommissioned, isDecommissionInProgress, read, readFields, setAdminState, setCapacity, setDecommissioned, setHostName, setLastUpdate, setLevel, setNetworkLocation, setParent, setRemaining, setXceiverCount, startDecommission, stopDecommission, write |
Methods inherited from class org.apache.hadoop.hdfs.protocol.DatanodeID |
---|
compareTo, getHost, getInfoPort, getIpcPort, getName, getPort, getStorageID, setStorageID, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.hadoop.net.Node |
---|
getName |
Field Detail |
---|
protected boolean isAlive
protected boolean needKeyUpdate
Constructor Detail |
---|
public DatanodeDescriptor()
public DatanodeDescriptor(DatanodeID nodeID)
nodeID
- id of the data nodepublic DatanodeDescriptor(DatanodeID nodeID, String networkLocation)
nodeID
- id of the data nodenetworkLocation
- location of the data node in networkpublic DatanodeDescriptor(DatanodeID nodeID, String networkLocation, String hostName)
nodeID
- id of the data nodenetworkLocation
- location of the data node in networkhostName
- it could be different from host specified for DatanodeIDpublic DatanodeDescriptor(DatanodeID nodeID, long capacity, long dfsUsed, long remaining, int xceiverCount, int failedVolumes)
nodeID
- id of the data nodecapacity
- capacity of the data nodedfsUsed
- space used by the data noderemaining
- remaing capacity of the data nodexceiverCount
- # of data transfers at the data nodepublic DatanodeDescriptor(DatanodeID nodeID, String networkLocation, String hostName, long capacity, long dfsUsed, long remaining, int xceiverCount, int failedVolumes)
nodeID
- id of the data nodenetworkLocation
- location of the data node in networkcapacity
- capacity of the data node, including space used by non-dfsdfsUsed
- the used space by dfs datanoderemaining
- remaining capacity of the data nodexceiverCount
- # of data transfers at the data nodeMethod Detail |
---|
public int numBlocks()
public int getBlocksScheduled()
public int hashCode()
hashCode
in class DatanodeInfo
public boolean equals(Object obj)
equals
in class DatanodeInfo
public int getVolumeFailures()
public void updateRegInfo(DatanodeID nodeReg)
DatanodeID
updateRegInfo
in class DatanodeID
nodeReg
- DatanodeID to update registration for.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |