|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hdfs.protocol.DatanodeID
org.apache.hadoop.hdfs.protocol.DatanodeInfo
@InterfaceAudience.Private @InterfaceStability.Evolving 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 supplied 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.hdfs.protocol.DatanodeID |
---|
EMPTY_ARRAY, infoPort, ipcPort, name, storageID |
Constructor Summary | |
---|---|
|
DatanodeInfo()
|
|
DatanodeInfo(DatanodeID nodeID)
|
protected |
DatanodeInfo(DatanodeID nodeID,
String location,
String hostName)
|
|
DatanodeInfo(DatanodeInfo from)
|
Method Summary | |
---|---|
String |
dumpDatanode()
A formatted string for printing the status of the DataNode. |
boolean |
equals(Object obj)
|
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. |
float |
getDfsUsedPercent()
The used space by the data node as percentage of present capacity |
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 |
long |
getNonDfsUsed()
The used space by the data node. |
org.apache.hadoop.net.Node |
getParent()
Return this node's parent |
long |
getRemaining()
The raw free space. |
float |
getRemainingPercent()
The remaining space as percentage of configured capacity. |
int |
getXceiverCount()
number of active connections |
int |
hashCode()
|
boolean |
isDecommissioned()
Returns true if the node has been decommissioned. |
boolean |
isDecommissionInProgress()
Returns true if the node is in the process of being decommissioned |
static DatanodeInfo |
read(DataInput in)
Read a DatanodeInfo |
void |
readFields(DataInput in)
|
protected void |
setAdminState(DatanodeInfo.AdminStates newState)
Sets the admin state of this node. |
void |
setCapacity(long capacity)
Sets raw capacity. |
void |
setDecommissioned()
Sets the admin state to indicate that decommission is complete. |
void |
setHostName(String host)
|
void |
setLastUpdate(long lastUpdate)
Sets time when this information was accurate. |
void |
setLevel(int level)
|
void |
setNetworkLocation(String location)
Sets the rack name |
void |
setParent(org.apache.hadoop.net.Node parent)
|
void |
setRemaining(long remaining)
Sets raw free space. |
void |
setXceiverCount(int xceiverCount)
Sets number of active connections |
void |
startDecommission()
Start decommissioning a node. |
void |
stopDecommission()
Stop decommissioning a node. |
void |
write(DataOutput out)
|
Methods inherited from class org.apache.hadoop.hdfs.protocol.DatanodeID |
---|
compareTo, getHost, getInfoPort, getIpcPort, getName, getPort, getStorageID, setStorageID, toString, updateRegInfo |
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
@Nullable protected String hostName
@Nullable protected DatanodeInfo.AdminStates adminState
Constructor Detail |
---|
public DatanodeInfo()
public DatanodeInfo(DatanodeInfo from)
public DatanodeInfo(DatanodeID nodeID)
protected DatanodeInfo(DatanodeID nodeID, String location, String hostName)
Method Detail |
---|
public long getCapacity()
public long getDfsUsed()
public long getNonDfsUsed()
public float getDfsUsedPercent()
public long getRemaining()
public float getRemainingPercent()
public long getLastUpdate()
public int getXceiverCount()
public void setCapacity(long capacity)
public void setRemaining(long remaining)
public void setLastUpdate(long lastUpdate)
public void setXceiverCount(int xceiverCount)
public String getNetworkLocation()
getNetworkLocation
in interface org.apache.hadoop.net.Node
public void setNetworkLocation(String location)
setNetworkLocation
in interface org.apache.hadoop.net.Node
public String getHostName()
public void setHostName(String host)
public String getDatanodeReport()
public String dumpDatanode()
public void startDecommission()
public void stopDecommission()
public boolean isDecommissionInProgress()
public boolean isDecommissioned()
public void setDecommissioned()
protected void setAdminState(DatanodeInfo.AdminStates newState)
public org.apache.hadoop.net.Node getParent()
getParent
in interface org.apache.hadoop.net.Node
public void setParent(org.apache.hadoop.net.Node parent)
setParent
in interface org.apache.hadoop.net.Node
public int getLevel()
getLevel
in interface org.apache.hadoop.net.Node
public void setLevel(int level)
setLevel
in interface org.apache.hadoop.net.Node
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
write
in class DatanodeID
IOException
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
readFields
in class DatanodeID
IOException
public static DatanodeInfo read(DataInput in) throws IOException
IOException
public int hashCode()
hashCode
in class DatanodeID
public boolean equals(Object obj)
equals
in class DatanodeID
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |