org.apache.hadoop.yarn.api.records
Class NodeId

java.lang.Object
  extended by org.apache.hadoop.yarn.api.records.NodeId
All Implemented Interfaces:
Comparable<NodeId>

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract class NodeId
extends Object
implements 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
NodeId()
           
 
Method Summary
protected abstract  void build()
           
 int compareTo(NodeId other)
           
 boolean equals(Object obj)
           
abstract  String getHost()
          Get the hostname of the node.
abstract  int getPort()
          Get the port for communicating with the node.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NodeId

public NodeId()
Method Detail

getHost

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract String getHost()
Get the hostname of the node.

Returns:
hostname of the node

getPort

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract int getPort()
Get the port for communicating with the node.

Returns:
port for communicating with the node

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

compareTo

public int compareTo(NodeId other)
Specified by:
compareTo in interface Comparable<NodeId>

build

protected abstract void build()


Copyright © 2013 Apache Software Foundation. All Rights Reserved.