org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.fica
Class FiCaSchedulerNode

java.lang.Object
  extended by org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNode
      extended by org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.fica.FiCaSchedulerNode

public class FiCaSchedulerNode
extends SchedulerNode


Constructor Summary
FiCaSchedulerNode(RMNode node, boolean usePortForNodeName)
           
 
Method Summary
 void allocateContainer(org.apache.hadoop.yarn.api.records.ApplicationId applicationId, RMContainer rmContainer)
          The Scheduler has allocated containers on this node to the given application.
 org.apache.hadoop.yarn.api.records.Resource getAvailableResource()
          Get available resources on the node.
 String getHttpAddress()
           
 org.apache.hadoop.yarn.api.records.NodeId getNodeID()
          Get the ID of the node which contains both its hostname and port.
 String getNodeName()
          Get the name of the node for scheduling matching decisions.
 int getNumContainers()
          Get number of active containers on the node.
 String getRackName()
          Get rackname.
 RMContainer getReservedContainer()
           
 RMNode getRMNode()
           
 List<RMContainer> getRunningContainers()
           
 org.apache.hadoop.yarn.api.records.Resource getTotalResource()
          Get total resources on the node.
 org.apache.hadoop.yarn.api.records.Resource getUsedResource()
          Get used resources on the node.
 void releaseContainer(org.apache.hadoop.yarn.api.records.Container container)
          Release an allocated container on this node.
 void reserveResource(SchedulerApplication application, org.apache.hadoop.yarn.api.records.Priority priority, RMContainer reservedContainer)
           
 String toString()
           
 void unreserveResource(SchedulerApplication application)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FiCaSchedulerNode

public FiCaSchedulerNode(RMNode node,
                         boolean usePortForNodeName)
Method Detail

getRMNode

public RMNode getRMNode()

getNodeID

public org.apache.hadoop.yarn.api.records.NodeId getNodeID()
Description copied from class: SchedulerNode
Get the ID of the node which contains both its hostname and port.

Specified by:
getNodeID in class SchedulerNode
Returns:
the ID of the node

getHttpAddress

public String getHttpAddress()

getNodeName

public String getNodeName()
Description copied from class: SchedulerNode
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.

Specified by:
getNodeName in class SchedulerNode
Returns:
name of the node for scheduling matching decisions.

getRackName

public String getRackName()
Description copied from class: SchedulerNode
Get rackname.

Specified by:
getRackName in class SchedulerNode
Returns:
rackname

allocateContainer

public void allocateContainer(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
                              RMContainer rmContainer)
The Scheduler has allocated containers on this node to the given application.

Parameters:
applicationId - application
rmContainer - allocated container

getAvailableResource

public org.apache.hadoop.yarn.api.records.Resource getAvailableResource()
Description copied from class: SchedulerNode
Get available resources on the node.

Specified by:
getAvailableResource in class SchedulerNode
Returns:
available resources on the node

getUsedResource

public org.apache.hadoop.yarn.api.records.Resource getUsedResource()
Description copied from class: SchedulerNode
Get used resources on the node.

Specified by:
getUsedResource in class SchedulerNode
Returns:
used resources on the node

getTotalResource

public org.apache.hadoop.yarn.api.records.Resource getTotalResource()
Description copied from class: SchedulerNode
Get total resources on the node.

Specified by:
getTotalResource in class SchedulerNode
Returns:
total resources on the node.

releaseContainer

public void releaseContainer(org.apache.hadoop.yarn.api.records.Container container)
Release an allocated container on this node.

Parameters:
container - container to be released

toString

public String toString()
Overrides:
toString in class Object

getNumContainers

public int getNumContainers()
Description copied from class: SchedulerNode
Get number of active containers on the node.

Specified by:
getNumContainers in class SchedulerNode
Returns:
number of active containers on the node

getRunningContainers

public List<RMContainer> getRunningContainers()

reserveResource

public void reserveResource(SchedulerApplication application,
                            org.apache.hadoop.yarn.api.records.Priority priority,
                            RMContainer reservedContainer)

unreserveResource

public void unreserveResource(SchedulerApplication application)

getReservedContainer

public RMContainer getReservedContainer()


Copyright © 2014 Apache Software Foundation. All Rights Reserved.