org.apache.nutch.ndfs
Class DatanodeInfo
java.lang.Object
org.apache.nutch.ndfs.DatanodeInfo
- All Implemented Interfaces:
- Comparable, Writable
- public class DatanodeInfo
- extends Object
- implements Writable, Comparable
DatanodeInfo tracks stats on a given node
- Author:
- Mike Cafarella
DatanodeInfo
public DatanodeInfo()
DatanodeInfo
public DatanodeInfo(UTF8 name)
DatanodeInfo
public DatanodeInfo(UTF8 name,
long capacity,
long remaining)
updateBlocks
public void updateBlocks(Block[] newBlocks)
addBlock
public void addBlock(Block b)
updateHeartbeat
public void updateHeartbeat(long capacity,
long remaining)
getName
public UTF8 getName()
getHost
public UTF8 getHost()
toString
public String toString()
getBlocks
public Block[] getBlocks()
getBlockIterator
public Iterator getBlockIterator()
getCapacity
public long getCapacity()
getRemaining
public long getRemaining()
lastUpdate
public long lastUpdate()
updateObsoleteCheck
public void updateObsoleteCheck()
lastObsoleteCheck
public long lastObsoleteCheck()
compareTo
public int compareTo(Object o)
- Specified by:
compareTo
in interface Comparable
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
- 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
- Throws:
IOException
Copyright © 2006 The Apache Software Foundation