public class DatanodeDescriptor extends DatanodeInfo
限定符和类型 | 类和说明 |
---|---|
static class |
DatanodeDescriptor.BlockTargetPair
Block and targets pair
|
DatanodeInfo.AdminStates
限定符和类型 | 字段和说明 |
---|---|
protected boolean |
isAlive |
protected boolean |
needKeyUpdate |
adminState, capacity, dfsUsed, hostName, lastUpdate, location, remaining, xceiverCount
EMPTY_ARRAY, infoPort, ipcPort, name, storageID
构造器和说明 |
---|
DatanodeDescriptor()
Default constructor
|
DatanodeDescriptor(DatanodeID nodeID)
DatanodeDescriptor constructor
|
DatanodeDescriptor(DatanodeID nodeID,
long capacity,
long dfsUsed,
long remaining,
int xceiverCount)
DatanodeDescriptor constructor
|
DatanodeDescriptor(DatanodeID nodeID,
String networkLocation)
DatanodeDescriptor constructor
|
DatanodeDescriptor(DatanodeID nodeID,
String networkLocation,
String hostName)
DatanodeDescriptor constructor
|
DatanodeDescriptor(DatanodeID nodeID,
String networkLocation,
String hostName,
long capacity,
long dfsUsed,
long remaining,
int xceiverCount)
DatanodeDescriptor constructor
|
限定符和类型 | 方法和说明 |
---|---|
long |
getBalancerBandwidth() |
int |
getBlocksScheduled() |
int |
numBlocks() |
void |
setBalancerBandwidth(long bandwidth) |
dumpDatanode, getAdminState, getCapacity, getDatanodeReport, getDfsUsed, getDfsUsedPercent, getHostName, getLastUpdate, getLevel, getName, getNameWithIpcPort, getNetworkLocation, getNonDfsUsed, getParent, getRemaining, getRemainingPercent, getXceiverCount, isDecommissioned, isDecommissionInProgress, isStale, readFields, setAdminState, setCapacity, setDecommissioned, setHostName, setLastUpdate, setLevel, setNetworkLocation, setParent, setRemaining, setXceiverCount, startDecommission, stopDecommission, write
compareTo, equals, getHost, getInfoPort, getIpcPort, getName, getPort, getStorageID, hashCode, setStorageID, toString, updateRegInfo
public DatanodeDescriptor()
public DatanodeDescriptor(DatanodeID nodeID)
nodeID
- id of the data nodepublic DatanodeDescriptor(DatanodeID nodeID, String networkLocation)
nodeID
- id of the data nodenetworkLocation
- location of the data node in networkpublic DatanodeDescriptor(DatanodeID nodeID, String networkLocation, String hostName)
nodeID
- id of the data nodenetworkLocation
- location of the data node in networkhostName
- it could be different from host specified for DatanodeIDpublic DatanodeDescriptor(DatanodeID nodeID, long capacity, long dfsUsed, long remaining, int xceiverCount)
nodeID
- id of the data nodecapacity
- capacity of the data nodedfsUsed
- space used by the data noderemaining
- remaing capacity of the data nodexceiverCount
- # of data transfers at the data nodepublic DatanodeDescriptor(DatanodeID nodeID, String networkLocation, String hostName, long capacity, long dfsUsed, long remaining, int xceiverCount)
nodeID
- id of the data nodenetworkLocation
- location of the data node in networkcapacity
- capacity of the data node, including space used by non-dfsdfsUsed
- the used space by dfs datanoderemaining
- remaing capacity of the data nodexceiverCount
- # of data transfers at the data nodepublic int numBlocks()
public int getBlocksScheduled()
public long getBalancerBandwidth()
public void setBalancerBandwidth(long bandwidth)
bandwidth
- Blanacer bandwidth in bytes per second for this datanode.Copyright © 2009 The Apache Software Foundation