org.apache.hadoop.yarn.server.resourcemanager.scheduler
Class SchedulerNode

java.lang.Object
  extended by org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNode
Direct Known Subclasses:
FiCaSchedulerNode, FSSchedulerNode

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract class SchedulerNode
extends Object

Represents a YARN Cluster Node from the viewpoint of the scheduler.


Constructor Summary
SchedulerNode()
           
 
Method Summary
abstract  org.apache.hadoop.yarn.api.records.Resource getAvailableResource()
          Get available resources on the node.
abstract  org.apache.hadoop.yarn.api.records.NodeId getNodeID()
          Get the ID of the node which contains both its hostname and port.
abstract  String getNodeName()
          Get the name of the node for scheduling matching decisions.
abstract  int getNumContainers()
          Get number of active containers on the node.
abstract  String getRackName()
          Get rackname.
abstract  org.apache.hadoop.yarn.api.records.Resource getTotalResource()
          Get total resources on the node.
abstract  org.apache.hadoop.yarn.api.records.Resource getUsedResource()
          Get used resources on the node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchedulerNode

public SchedulerNode()
Method Detail

getNodeName

public abstract String getNodeName()
Get the name of the node for scheduling matching decisions.

Typically this is the 'hostname' reported by the node, but it could be configured to be 'hostname:port' reported by the node via the YarnConfiguration.RM_SCHEDULER_INCLUDE_PORT_IN_NODE_NAME constant. The main usecase of this is Yarn minicluster to be able to differentiate node manager instances by their port number.

Returns:
name of the node for scheduling matching decisions.

getRackName

public abstract String getRackName()
Get rackname.

Returns:
rackname

getUsedResource

public abstract org.apache.hadoop.yarn.api.records.Resource getUsedResource()
Get used resources on the node.

Returns:
used resources on the node

getAvailableResource

public abstract org.apache.hadoop.yarn.api.records.Resource getAvailableResource()
Get available resources on the node.

Returns:
available resources on the node

getNumContainers

public abstract int getNumContainers()
Get number of active containers on the node.

Returns:
number of active containers on the node

getTotalResource

public abstract org.apache.hadoop.yarn.api.records.Resource getTotalResource()
Get total resources on the node.

Returns:
total resources on the node.

getNodeID

public abstract org.apache.hadoop.yarn.api.records.NodeId getNodeID()
Get the ID of the node which contains both its hostname and port.

Returns:
the ID of the node


Copyright © 2014 Apache Software Foundation. All Rights Reserved.