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

java.lang.Object
  extended by org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerApplicationAttempt
      extended by org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.fica.FiCaSchedulerApp

@InterfaceAudience.Private
@InterfaceStability.Unstable
public class FiCaSchedulerApp
extends SchedulerApplicationAttempt

Represents an application attempt from the viewpoint of the FIFO or Capacity scheduler.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerApplicationAttempt
SchedulerApplicationAttempt.ContainersAndNMTokensAllocation
 
Field Summary
 
Fields inherited from class org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerApplicationAttempt
appSchedulingInfo, currentConsumption, currentReservation, isStopped, lastMemoryAggregateAllocationUpdateTime, lastScheduledContainer, liveContainers, newlyAllocatedContainers, queue, reservedContainers, rmContext
 
Constructor Summary
FiCaSchedulerApp(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId, String user, Queue queue, ActiveUsersManager activeUsersManager, RMContext rmContext)
           
 
Method Summary
 void addPreemptContainer(org.apache.hadoop.yarn.api.records.ContainerId cont)
           
 RMContainer allocate(NodeType type, FiCaSchedulerNode node, org.apache.hadoop.yarn.api.records.Priority priority, org.apache.hadoop.yarn.api.records.ResourceRequest request, org.apache.hadoop.yarn.api.records.Container container)
           
 boolean containerCompleted(RMContainer rmContainer, org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus, RMContainerEventType event)
           
 Allocation getAllocation(org.apache.hadoop.yarn.util.resource.ResourceCalculator rc, org.apache.hadoop.yarn.api.records.Resource clusterResource, org.apache.hadoop.yarn.api.records.Resource minimumAllocation)
          This method produces an Allocation that includes the current view of the resources that will be allocated to and preempted from this application.
 org.apache.hadoop.yarn.api.records.Resource getHeadroom()
          Get available headroom in terms of resources for the application's user.
 CapacityHeadroomProvider getHeadroomProvider()
           
 float getLocalityWaitFactor(org.apache.hadoop.yarn.api.records.Priority priority, int clusterNodes)
           
 org.apache.hadoop.yarn.api.records.NodeId getNodeIdToUnreserve(org.apache.hadoop.yarn.api.records.Priority priority, org.apache.hadoop.yarn.api.records.Resource capability)
           
 org.apache.hadoop.yarn.api.records.Resource getTotalPendingRequests()
           
 void setHeadroomProvider(CapacityHeadroomProvider headroomProvider)
           
 void transferStateFromPreviousAttempt(SchedulerApplicationAttempt appAttempt)
           
 boolean unreserve(FiCaSchedulerNode node, org.apache.hadoop.yarn.api.records.Priority priority)
           
 
Methods inherited from class org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerApplicationAttempt
addReReservation, addSchedulingOpportunity, containerLaunchedOnNode, getAMResource, getApplicationAttemptId, getApplicationId, getCurrentConsumption, getCurrentReservation, getLastScheduledContainer, getLiveContainers, getLiveContainersMap, getNewContainerId, getNumReservedContainers, getPendingRelease, getPriorities, getQueue, getQueueName, getReReservations, getReservedContainers, getResource, getResourceLimit, getResourceRequest, getResourceRequests, getResourceUsageReport, getRMContainer, getSchedulingOpportunities, getTotalRequiredResources, getUnmanagedAM, getUser, isAmRunning, isBlacklisted, isPending, isReserved, isStopped, move, pullNewlyAllocatedContainersAndNMTokens, recoverContainer, recoverResourceRequests, reserve, resetReReservations, resetSchedulingOpportunities, resetSchedulingOpportunities, setAMResource, setAmRunning, setHeadroom, showRequests, stop, subtractSchedulingOpportunity, updateBlacklist, updateResourceRequests
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FiCaSchedulerApp

public FiCaSchedulerApp(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId,
                        String user,
                        Queue queue,
                        ActiveUsersManager activeUsersManager,
                        RMContext rmContext)
Method Detail

containerCompleted

public boolean containerCompleted(RMContainer rmContainer,
                                  org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus,
                                  RMContainerEventType event)

allocate

public RMContainer allocate(NodeType type,
                            FiCaSchedulerNode node,
                            org.apache.hadoop.yarn.api.records.Priority priority,
                            org.apache.hadoop.yarn.api.records.ResourceRequest request,
                            org.apache.hadoop.yarn.api.records.Container container)

unreserve

public boolean unreserve(FiCaSchedulerNode node,
                         org.apache.hadoop.yarn.api.records.Priority priority)

getLocalityWaitFactor

public float getLocalityWaitFactor(org.apache.hadoop.yarn.api.records.Priority priority,
                                   int clusterNodes)

getTotalPendingRequests

public org.apache.hadoop.yarn.api.records.Resource getTotalPendingRequests()

addPreemptContainer

public void addPreemptContainer(org.apache.hadoop.yarn.api.records.ContainerId cont)

getAllocation

public Allocation getAllocation(org.apache.hadoop.yarn.util.resource.ResourceCalculator rc,
                                org.apache.hadoop.yarn.api.records.Resource clusterResource,
                                org.apache.hadoop.yarn.api.records.Resource minimumAllocation)
This method produces an Allocation that includes the current view of the resources that will be allocated to and preempted from this application.

Parameters:
rc -
clusterResource -
minimumAllocation -
Returns:
an allocation

getNodeIdToUnreserve

public org.apache.hadoop.yarn.api.records.NodeId getNodeIdToUnreserve(org.apache.hadoop.yarn.api.records.Priority priority,
                                                                      org.apache.hadoop.yarn.api.records.Resource capability)

setHeadroomProvider

public void setHeadroomProvider(CapacityHeadroomProvider headroomProvider)

getHeadroomProvider

public CapacityHeadroomProvider getHeadroomProvider()

getHeadroom

public org.apache.hadoop.yarn.api.records.Resource getHeadroom()
Description copied from class: SchedulerApplicationAttempt
Get available headroom in terms of resources for the application's user.

Overrides:
getHeadroom in class SchedulerApplicationAttempt
Returns:
available resource headroom

transferStateFromPreviousAttempt

public void transferStateFromPreviousAttempt(SchedulerApplicationAttempt appAttempt)
Overrides:
transferStateFromPreviousAttempt in class SchedulerApplicationAttempt


Copyright © 2014 Apache Software Foundation. All Rights Reserved.