|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 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 |
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. |
void |
setHostName(String host)
|
void |
setLevel(int level)
Set this node's level in the tree. |
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, 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 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 Nodepublic String getHostName()
public void setHostName(String host)
public String getDatanodeReport()
public Node getParent()
getParent in interface Nodepublic void setParent(Node parent)
Node
setParent in interface Nodepublic int getLevel()
getLevel in interface Nodepublic void setLevel(int level)
Node
setLevel in interface Node
public void write(DataOutput out)
throws IOException
Writableout.
write in interface Writablewrite in class DatanodeIDout - DataOuput to serialize this object into.
IOException
public void readFields(DataInput in)
throws IOException
Writablein.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields in interface WritablereadFields in class DatanodeIDin - DataInput to deseriablize this object from.
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||