|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.dfs.DatanodeID
public class DatanodeID
DatanodeID is composed of the data node name (hostname:portNumber) and the data storage ID, which it currently represents.
Field Summary | |
---|---|
protected int |
infoPort
|
protected int |
ipcPort
|
protected String |
name
|
protected String |
storageID
|
Constructor Summary | |
---|---|
DatanodeID()
Equivalent to DatanodeID(""). |
|
DatanodeID(DatanodeID from)
DatanodeID copy constructor |
|
DatanodeID(String nodeName)
Equivalent to DatanodeID(nodeName, "", -1, -1). |
|
DatanodeID(String nodeName,
String storageID,
int infoPort,
int ipcPort)
Create DatanodeID |
Method Summary | |
---|---|
int |
compareTo(DatanodeID that)
Comparable. |
boolean |
equals(Object to)
|
String |
getHost()
|
int |
getInfoPort()
|
int |
getIpcPort()
|
String |
getName()
|
int |
getPort()
|
String |
getStorageID()
|
int |
hashCode()
|
void |
readFields(DataInput in)
Deserialize the fields of this object from in . |
String |
toString()
|
void |
write(DataOutput out)
Serialize the fields of this object to out . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected String name
protected String storageID
protected int infoPort
protected int ipcPort
Constructor Detail |
---|
public DatanodeID()
public DatanodeID(String nodeName)
public DatanodeID(DatanodeID from)
from
- public DatanodeID(String nodeName, String storageID, int infoPort, int ipcPort)
nodeName
- (hostname:portNumber)storageID
- data storage IDinfoPort
- info server portipcPort
- ipc server portMethod Detail |
---|
public String getName()
public String getStorageID()
public int getInfoPort()
public int getIpcPort()
public String getHost()
public int getPort()
public boolean equals(Object to)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public int compareTo(DatanodeID that)
compareTo
in interface Comparable<DatanodeID>
that
-
public void write(DataOutput out) throws IOException
out
.
write
in interface Writable
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
in
- DataInput
to deseriablize this object from.
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |