org.apache.hadoop.dfs
Class DatanodeDescriptor
java.lang.Object
  
org.apache.hadoop.dfs.DatanodeID
      
org.apache.hadoop.dfs.DatanodeInfo
          
org.apache.hadoop.dfs.DatanodeDescriptor
- All Implemented Interfaces: 
 - Comparable<DatanodeID>, Writable, WritableComparable<DatanodeID>, Node
 
public class DatanodeDescriptor
- extends DatanodeInfo
 
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 a data structure that is internal
 to the namenode. It is *not* sent over-the-wire to the Client
 or the Datnodes. Neither is it stored persistently in the
 fsImage.
 
 
| 
Field Summary | 
protected  boolean | 
isAlive
 
            | 
 
 
 
| 
Constructor Summary | 
DatanodeDescriptor()
 
          Default constructor | 
DatanodeDescriptor(DatanodeID nodeID)
 
          DatanodeDescriptor constructor | 
DatanodeDescriptor(DatanodeID nodeID,
                   long capacity,
                   long dfsUsed,
                   long remaining,
                   int xceiverCount)
 
          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)
 
          DatanodeDescriptor constructor | 
 
 
| Methods inherited from class org.apache.hadoop.dfs.DatanodeInfo | 
getCapacity, getDatanodeReport, getDfsUsed, getHostName, getLastUpdate, getLevel, getNetworkLocation, getParent, getRemaining, getXceiverCount, readFields, setHostName, setLevel, setNetworkLocation, setParent, write | 
 
 
 
| Methods inherited from interface org.apache.hadoop.net.Node | 
getName | 
 
isAlive
protected boolean isAlive
DatanodeDescriptor
public DatanodeDescriptor()
- Default constructor
 
DatanodeDescriptor
public DatanodeDescriptor(DatanodeID nodeID)
- DatanodeDescriptor constructor
- Parameters:
 nodeID - id of the data node
 
DatanodeDescriptor
public DatanodeDescriptor(DatanodeID nodeID,
                          String networkLocation)
- DatanodeDescriptor constructor
- Parameters:
 nodeID - id of the data nodenetworkLocation - location of the data node in network
 
DatanodeDescriptor
public DatanodeDescriptor(DatanodeID nodeID,
                          String networkLocation,
                          String hostName)
- DatanodeDescriptor constructor
- Parameters:
 nodeID - id of the data nodenetworkLocation - location of the data node in networkhostName - it could be different from host specified for DatanodeID
 
DatanodeDescriptor
public DatanodeDescriptor(DatanodeID nodeID,
                          long capacity,
                          long dfsUsed,
                          long remaining,
                          int xceiverCount)
- DatanodeDescriptor constructor
- Parameters:
 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 node
 
DatanodeDescriptor
public DatanodeDescriptor(DatanodeID nodeID,
                          String networkLocation,
                          String hostName,
                          long capacity,
                          long dfsUsed,
                          long remaining,
                          int xceiverCount)
- DatanodeDescriptor constructor
- Parameters:
 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 - remaing capacity of the data nodexceiverCount - # of data transfers at the data node
 
getBlocksScheduled
public int getBlocksScheduled()
- Returns:
 - Approximate number of blocks currently scheduled to be written 
 to this datanode.
 
 
Copyright © 2008 The Apache Software Foundation