Class NodeId
java.lang.Object
org.apache.hadoop.yarn.api.records.NodeId
- All Implemented Interfaces:
Comparable<NodeId>
NodeId is the unique identifier for a node.
It includes the hostname and port to uniquely
identify the node. Thus, it is unique across restarts of any
NodeManager.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidbuild()intbooleanstatic NodeIdfromString(String nodeIdStr) abstract StringgetHost()Get the hostname of the node.abstract intgetPort()Get the port for communicating with the node.inthashCode()static NodeIdnewInstance(String host, int port) protected abstract voidprotected abstract voidsetPort(int port) toString()
-
Constructor Details
-
NodeId
public NodeId()
-
-
Method Details
-
newInstance
-
getHost
Get the hostname of the node.- Returns:
- hostname of the node
-
setHost
-
getPort
@Public @Stable public abstract int getPort()Get the port for communicating with the node.- Returns:
- port for communicating with the node
-
setPort
@Private @Unstable protected abstract void setPort(int port) -
toString
-
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<NodeId>
-
fromString
-
build
protected abstract void build()
-