org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair
Class FSSchedulerApp
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerApplication
org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FSSchedulerApp
@InterfaceAudience.Private
@InterfaceStability.Unstable
public class FSSchedulerApp
- extends SchedulerApplication
Represents an application attempt from the viewpoint of the Fair Scheduler.
Method Summary |
void |
addPreemption(RMContainer container,
long time)
|
RMContainer |
allocate(NodeType type,
FSSchedulerNode 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)
|
void |
containerCompleted(RMContainer rmContainer,
org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus,
RMContainerEventType event)
|
NodeType |
getAllowedLocalityLevel(org.apache.hadoop.yarn.api.records.Priority priority,
int numNodes,
double nodeLocalityThreshold,
double rackLocalityThreshold)
Return the level at which we are allowed to schedule containers, given the
current size of the cluster and thresholds indicating how many nodes to
fail at (as a fraction of cluster size) before relaxing scheduling
constraints. |
AppSchedulable |
getAppSchedulable()
|
Long |
getContainerPreemptionTime(RMContainer container)
|
float |
getLocalityWaitFactor(org.apache.hadoop.yarn.api.records.Priority priority,
int clusterNodes)
|
Set<RMContainer> |
getPreemptionContainers()
|
void |
resetAllowedLocalityLevel(org.apache.hadoop.yarn.api.records.Priority priority,
NodeType level)
Should be called when the scheduler assigns a container at a higher
degree of locality than the current threshold. |
void |
setAppSchedulable(AppSchedulable appSchedulable)
|
void |
unreserve(FSSchedulerNode node,
org.apache.hadoop.yarn.api.records.Priority priority)
|
Methods inherited from class org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerApplication |
addReReservation, addSchedulingOpportunity, containerLaunchedOnNode, getApplicationAttemptId, getApplicationId, getCurrentConsumption, getCurrentReservation, getHeadroom, getLiveContainers, getNewContainerId, getNumReservedContainers, getPriorities, getQueue, getQueueName, getReReservations, getReservedContainers, getResource, getResourceRequest, getResourceRequests, getRMContainer, getSchedulingOpportunities, getTotalRequiredResources, getUser, isBlacklisted, isPending, isReserved, isStopped, pullNewlyAllocatedContainers, reserve, resetReReservations, resetSchedulingOpportunities, resetSchedulingOpportunities, setHeadroom, showRequests, stop, subtractSchedulingOpportunity, updateBlacklist, updateResourceRequests |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FSSchedulerApp
public FSSchedulerApp(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId,
String user,
Queue queue,
ActiveUsersManager activeUsersManager,
RMContext rmContext)
setAppSchedulable
public void setAppSchedulable(AppSchedulable appSchedulable)
getAppSchedulable
public AppSchedulable getAppSchedulable()
containerCompleted
public void containerCompleted(RMContainer rmContainer,
org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus,
RMContainerEventType event)
unreserve
public void unreserve(FSSchedulerNode node,
org.apache.hadoop.yarn.api.records.Priority priority)
getLocalityWaitFactor
public float getLocalityWaitFactor(org.apache.hadoop.yarn.api.records.Priority priority,
int clusterNodes)
getAllowedLocalityLevel
public NodeType getAllowedLocalityLevel(org.apache.hadoop.yarn.api.records.Priority priority,
int numNodes,
double nodeLocalityThreshold,
double rackLocalityThreshold)
- Return the level at which we are allowed to schedule containers, given the
current size of the cluster and thresholds indicating how many nodes to
fail at (as a fraction of cluster size) before relaxing scheduling
constraints.
allocate
public RMContainer allocate(NodeType type,
FSSchedulerNode 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)
resetAllowedLocalityLevel
public void resetAllowedLocalityLevel(org.apache.hadoop.yarn.api.records.Priority priority,
NodeType level)
- Should be called when the scheduler assigns a container at a higher
degree of locality than the current threshold. Reset the allowed locality
level to a higher degree of locality.
addPreemption
public void addPreemption(RMContainer container,
long time)
getContainerPreemptionTime
public Long getContainerPreemptionTime(RMContainer container)
getPreemptionContainers
public Set<RMContainer> getPreemptionContainers()
Copyright © 2014 Apache Software Foundation. All Rights Reserved.