org.apache.hadoop.yarn.server.resourcemanager.rmnode
Class RMNodeImpl

java.lang.Object
  extended by org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNodeImpl
All Implemented Interfaces:
org.apache.hadoop.yarn.event.EventHandler<RMNodeEvent>, RMNode

@InterfaceAudience.Private
@InterfaceStability.Unstable
public class RMNodeImpl
extends Object
implements RMNode, org.apache.hadoop.yarn.event.EventHandler<RMNodeEvent>

This class is used to keep track of all the applications/containers running on a node.


Nested Class Summary
static class RMNodeImpl.AddNodeTransition
           
static class RMNodeImpl.CleanUpAppTransition
           
static class RMNodeImpl.CleanUpContainerTransition
           
static class RMNodeImpl.DeactivateNodeTransition
           
static class RMNodeImpl.StatusUpdateWhenHealthyTransition
           
static class RMNodeImpl.StatusUpdateWhenUnHealthyTransition
           
 
Field Summary
 
Fields inherited from interface org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNode
ANY
 
Constructor Summary
RMNodeImpl(org.apache.hadoop.yarn.api.records.NodeId nodeId, RMContext context, String hostName, int cmPort, int httpPort, org.apache.hadoop.net.Node node, org.apache.hadoop.yarn.api.records.Resource capability)
           
 
Method Summary
 List<org.apache.hadoop.yarn.api.records.ApplicationId> getAppsToCleanup()
           
 int getCommandPort()
          the command port for this node
 List<org.apache.hadoop.yarn.api.records.ContainerId> getContainersToCleanUp()
           
 String getHostName()
          the hostname of this node
 String getHttpAddress()
          the http-Address for this node.
 int getHttpPort()
          the http port for this node
 org.apache.hadoop.yarn.server.api.records.HeartbeatResponse getLastHeartBeatResponse()
           
 org.apache.hadoop.net.Node getNode()
          the Node information for this node.
 String getNodeAddress()
          the ContainerManager address for this node.
 org.apache.hadoop.yarn.api.records.NodeHealthStatus getNodeHealthStatus()
          the health-status for this node
 org.apache.hadoop.yarn.api.records.NodeId getNodeID()
          the node id of of this node.
 String getRackName()
          The rack name for this node manager.
 RMNodeState getState()
           
 org.apache.hadoop.yarn.api.records.Resource getTotalCapability()
          the total available resource.
 void handle(RMNodeEvent event)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RMNodeImpl

public RMNodeImpl(org.apache.hadoop.yarn.api.records.NodeId nodeId,
                  RMContext context,
                  String hostName,
                  int cmPort,
                  int httpPort,
                  org.apache.hadoop.net.Node node,
                  org.apache.hadoop.yarn.api.records.Resource capability)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getHostName

public String getHostName()
Description copied from interface: RMNode
the hostname of this node

Specified by:
getHostName in interface RMNode
Returns:
hostname of this node

getCommandPort

public int getCommandPort()
Description copied from interface: RMNode
the command port for this node

Specified by:
getCommandPort in interface RMNode
Returns:
command port for this node

getHttpPort

public int getHttpPort()
Description copied from interface: RMNode
the http port for this node

Specified by:
getHttpPort in interface RMNode
Returns:
http port for this node

getNodeID

public org.apache.hadoop.yarn.api.records.NodeId getNodeID()
Description copied from interface: RMNode
the node id of of this node.

Specified by:
getNodeID in interface RMNode
Returns:
the node id of this node.

getNodeAddress

public String getNodeAddress()
Description copied from interface: RMNode
the ContainerManager address for this node.

Specified by:
getNodeAddress in interface RMNode
Returns:
the ContainerManager address for this node.

getHttpAddress

public String getHttpAddress()
Description copied from interface: RMNode
the http-Address for this node.

Specified by:
getHttpAddress in interface RMNode
Returns:
the http-url address for this node

getTotalCapability

public org.apache.hadoop.yarn.api.records.Resource getTotalCapability()
Description copied from interface: RMNode
the total available resource.

Specified by:
getTotalCapability in interface RMNode
Returns:
the total available resource.

getRackName

public String getRackName()
Description copied from interface: RMNode
The rack name for this node manager.

Specified by:
getRackName in interface RMNode
Returns:
the rack name.

getNode

public org.apache.hadoop.net.Node getNode()
Description copied from interface: RMNode
the Node information for this node.

Specified by:
getNode in interface RMNode
Returns:
Node information for this node.

getNodeHealthStatus

public org.apache.hadoop.yarn.api.records.NodeHealthStatus getNodeHealthStatus()
Description copied from interface: RMNode
the health-status for this node

Specified by:
getNodeHealthStatus in interface RMNode
Returns:
the health-status for this node.

getState

public RMNodeState getState()
Specified by:
getState in interface RMNode

getAppsToCleanup

public List<org.apache.hadoop.yarn.api.records.ApplicationId> getAppsToCleanup()
Specified by:
getAppsToCleanup in interface RMNode

getContainersToCleanUp

public List<org.apache.hadoop.yarn.api.records.ContainerId> getContainersToCleanUp()
Specified by:
getContainersToCleanUp in interface RMNode

getLastHeartBeatResponse

public org.apache.hadoop.yarn.server.api.records.HeartbeatResponse getLastHeartBeatResponse()
Specified by:
getLastHeartBeatResponse in interface RMNode

handle

public void handle(RMNodeEvent event)
Specified by:
handle in interface org.apache.hadoop.yarn.event.EventHandler<RMNodeEvent>


Copyright © 2012 Apache Software Foundation. All Rights Reserved.