org.apache.hadoop.dfs
Class DatanodeInfo

java.lang.Object
  extended by org.apache.hadoop.dfs.DatanodeID
      extended by org.apache.hadoop.dfs.DatanodeInfo
All Implemented Interfaces:
Comparable, Writable, WritableComparable

public class DatanodeInfo
extends DatanodeID

DatanodeInfo represents the status of a DataNode.

Author:
Mike Cafarella, Konstantin Shvachko

Field Summary
protected  long capacity
           
protected  long lastUpdate
           
protected  long remaining
           
protected  int xceiverCount
           
 
Fields inherited from class org.apache.hadoop.dfs.DatanodeID
infoPort, name, storageID
 
Method Summary
 long getCapacity()
          The raw capacity.
 String getDatanodeReport()
          A formatted string for reporting the status of the DataNode.
 long getLastUpdate()
          The time when this information was accurate.
 long getRemaining()
          The raw free space.
 int getXceiverCount()
          number of active connections
 void readFields(DataInput in)
          Reads the fields of this object from in.
 void write(DataOutput out)
          Writes the fields of this object to out.
 
Methods inherited from class org.apache.hadoop.dfs.DatanodeID
compareTo, equals, getHost, getInfoPort, getName, getStorageID, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

capacity

protected long capacity

remaining

protected long remaining

lastUpdate

protected long lastUpdate

xceiverCount

protected int xceiverCount
Method Detail

getCapacity

public long getCapacity()
The raw capacity.


getRemaining

public long getRemaining()
The raw free space.


getLastUpdate

public long getLastUpdate()
The time when this information was accurate.


getXceiverCount

public int getXceiverCount()
number of active connections


getDatanodeReport

public String getDatanodeReport()
A formatted string for reporting the status of the DataNode.


write

public void write(DataOutput out)
           throws IOException
Description copied from interface: Writable
Writes the fields of this object to out.

Specified by:
write in interface Writable
Overrides:
write in class DatanodeID
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Description copied from interface: Writable
Reads the fields of this object from in. For efficiency, implementations should attempt to re-use storage in the existing object where possible.

Specified by:
readFields in interface Writable
Overrides:
readFields in class DatanodeID
Throws:
IOException


Copyright © 2006 The Apache Software Foundation