Class RemoteNode
java.lang.Object
org.apache.hadoop.yarn.server.api.protocolrecords.RemoteNode
- All Implemented Interfaces:
Comparable<RemoteNode>
- Direct Known Subclasses:
RemoteNodePBImpl
@Private
@Unstable
public abstract class RemoteNode
extends Object
implements Comparable<RemoteNode>
This class is used to encapsulate the
NodeId as well as the HTTP
address that can be used to communicate with the Node.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(RemoteNode other) abstract StringGet HTTP address.abstract org.apache.hadoop.yarn.api.records.NodeIdGetNodeId.abstract StringGet Node Partition.abstract StringGet Rack Name.static RemoteNodenewInstance(org.apache.hadoop.yarn.api.records.NodeId nodeId, String httpAddress) Create new Instance.static RemoteNodenewInstance(org.apache.hadoop.yarn.api.records.NodeId nodeId, String httpAddress, String rackName) Create new Instance.static RemoteNodenewInstance(org.apache.hadoop.yarn.api.records.NodeId nodeId, String httpAddress, String rackName, String nodePartition) Create new Instance.abstract voidsetHttpAddress(String httpAddress) Set HTTP address.abstract voidsetNodeId(org.apache.hadoop.yarn.api.records.NodeId nodeId) SetNodeId.abstract voidsetNodePartition(String nodePartition) Set Node Partition.abstract voidsetRackName(String rackName) Set Rack Name.toString()
-
Constructor Details
-
RemoteNode
public RemoteNode()
-
-
Method Details
-
newInstance
@Private @Unstable public static RemoteNode newInstance(org.apache.hadoop.yarn.api.records.NodeId nodeId, String httpAddress) Create new Instance.- Parameters:
nodeId- NodeId.httpAddress- Http address.- Returns:
- RemoteNode instance.
-
newInstance
@Private @Unstable public static RemoteNode newInstance(org.apache.hadoop.yarn.api.records.NodeId nodeId, String httpAddress, String rackName) Create new Instance.- Parameters:
nodeId- NodeId.httpAddress- Http address.rackName- Rack Name.- Returns:
- RemoteNode instance.
-
newInstance
@Private @Unstable public static RemoteNode newInstance(org.apache.hadoop.yarn.api.records.NodeId nodeId, String httpAddress, String rackName, String nodePartition) Create new Instance.- Parameters:
nodeId- NodeId.httpAddress- Http address.rackName- Rack Name.nodePartition- Node Partition.- Returns:
- RemoteNode Instance.
-
getNodeId
@Private @Unstable public abstract org.apache.hadoop.yarn.api.records.NodeId getNodeId()GetNodeId.- Returns:
- NodeId.
-
setNodeId
@Private @Unstable public abstract void setNodeId(org.apache.hadoop.yarn.api.records.NodeId nodeId) SetNodeId.- Parameters:
nodeId- NodeId.
-
getHttpAddress
Get HTTP address.- Returns:
- Http Address.
-
setHttpAddress
Set HTTP address.- Parameters:
httpAddress- HTTP address.
-
getRackName
Get Rack Name.- Returns:
- Rack Name.
-
setRackName
Set Rack Name.- Parameters:
rackName- Rack Name.
-
getNodePartition
Get Node Partition.- Returns:
- Node Partition.
-
setNodePartition
Set Node Partition.- Parameters:
nodePartition- node Partition.
-
compareTo
- Specified by:
compareToin interfaceComparable<RemoteNode>
-
toString
-