net.nutch.fs
Class DatanodeInfo
java.lang.Object
net.nutch.fs.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,
UTF8 machineName,
int port,
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()
toString
public String toString()
getMachineName
public UTF8 getMachineName()
getPort
public int getPort()
getBlocks
public Block[] getBlocks()
getCapacity
public long getCapacity()
getRemaining
public long getRemaining()
lastUpdate
public long lastUpdate()
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 © 2004 The Nutch Organization.