public class DatanodeID extends Object implements WritableComparable<DatanodeID>
限定符和类型 | 字段和说明 |
---|---|
static DatanodeID[] |
EMPTY_ARRAY |
protected int |
infoPort |
int |
ipcPort |
String |
name |
String |
storageID |
构造器和说明 |
---|
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
|
限定符和类型 | 方法和说明 |
---|---|
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 . |
void |
setStorageID(String storageID)
sets the data storage ID.
|
String |
toString() |
void |
updateRegInfo(DatanodeID nodeReg)
Update fields when a new registration request comes in.
|
void |
write(DataOutput out)
Serialize the fields of this object to
out . |
public static final DatanodeID[] EMPTY_ARRAY
public String name
public String storageID
protected int infoPort
public int ipcPort
public DatanodeID()
public DatanodeID(String nodeName)
public DatanodeID(DatanodeID from)
from
- public String getName()
public String getStorageID()
public int getInfoPort()
public int getIpcPort()
public void setStorageID(String storageID)
public String getHost()
public int getPort()
public void updateRegInfo(DatanodeID nodeReg)
public int compareTo(DatanodeID that)
compareTo
在接口中 Comparable<DatanodeID>
that
- public void write(DataOutput out) throws IOException
out
.write
在接口中 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
在接口中 Writable
in
- DataInput
to deseriablize this object from.IOException
Copyright © 2009 The Apache Software Foundation