|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.dfs.DatanodeID org.apache.hadoop.dfs.DatanodeInfo
public class DatanodeInfo
DatanodeInfo represents the status of a DataNode. This object is used for communication in the Datanode Protocol and the Client Protocol.
Nested Class Summary | |
---|---|
static class |
DatanodeInfo.AdminStates
|
Field Summary | |
---|---|
protected DatanodeInfo.AdminStates |
adminState
|
protected long |
capacity
|
protected long |
dfsUsed
|
protected String |
hostName
HostName as suplied by the datanode during registration as its name. |
protected long |
lastUpdate
|
protected String |
location
|
protected long |
remaining
|
protected int |
xceiverCount
|
Fields inherited from class org.apache.hadoop.dfs.DatanodeID |
---|
infoPort, ipcPort, name, storageID |
Method Summary | |
---|---|
long |
getCapacity()
The raw capacity. |
String |
getDatanodeReport()
A formatted string for reporting the status of the DataNode. |
long |
getDfsUsed()
The used space by the data node. |
String |
getHostName()
|
long |
getLastUpdate()
The time when this information was accurate. |
int |
getLevel()
Return this node's level in the tree. |
String |
getNetworkLocation()
rack name |
Node |
getParent()
Return this node's parent |
long |
getRemaining()
The raw free space. |
int |
getXceiverCount()
number of active connections |
void |
readFields(DataInput in)
Deserialize the fields of this object from in .
For efficiency, implementations should attempt to re-use storage in the existing object where possible. |
void |
setHostName(String host)
|
void |
setLevel(int level)
Set this node's level in the tree. |
void |
setNetworkLocation(String location)
Sets the rack name |
void |
setParent(Node parent)
Set this node's parent |
void |
write(DataOutput out)
Serialize the fields of this object to out . |
Methods inherited from class org.apache.hadoop.dfs.DatanodeID |
---|
compareTo, equals, getHost, getInfoPort, getIpcPort, getName, getPort, getStorageID, hashCode, 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 long capacity
protected long dfsUsed
protected long remaining
protected long lastUpdate
protected int xceiverCount
protected String location
protected String hostName
protected DatanodeInfo.AdminStates adminState
Method Detail |
---|
public long getCapacity()
public long getDfsUsed()
public long getRemaining()
public long getLastUpdate()
public int getXceiverCount()
public String getNetworkLocation()
getNetworkLocation
in interface Node
public void setNetworkLocation(String location)
setNetworkLocation
in interface Node
public String getHostName()
public void setHostName(String host)
public String getDatanodeReport()
public Node getParent()
getParent
in interface Node
public void setParent(Node parent)
Node
setParent
in interface Node
public int getLevel()
getLevel
in interface Node
public void setLevel(int level)
Node
setLevel
in interface Node
public void write(DataOutput out) throws IOException
out
.
write
in interface Writable
write
in class DatanodeID
out
- DataOuput
to serialize this object into.
IOException
public void readFields(DataInput in) throws IOException
in
.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields
in interface Writable
readFields
in class DatanodeID
in
- DataInput
to deseriablize this object from.
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |