@InterfaceAudience.Private @InterfaceStability.Unstable public class FSSchedulerApp extends SchedulerApplication
Constructor and Description |
---|
FSSchedulerApp(ApplicationAttemptId applicationAttemptId,
String user,
Queue queue,
ActiveUsersManager activeUsersManager,
RMContext rmContext) |
Modifier and Type | Method and Description |
---|---|
void |
addPreemption(RMContainer container,
long time) |
void |
addSchedulingOpportunity(Priority priority) |
RMContainer |
allocate(NodeType type,
FSSchedulerNode node,
Priority priority,
ResourceRequest request,
Container container) |
void |
containerCompleted(RMContainer rmContainer,
ContainerStatus containerStatus,
RMContainerEventType event) |
void |
containerLaunchedOnNode(ContainerId containerId,
NodeId nodeId) |
NodeType |
getAllowedLocalityLevel(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.
|
ApplicationAttemptId |
getApplicationAttemptId()
Get
ApplicationAttemptId of the application master. |
ApplicationId |
getApplicationId() |
AppSchedulable |
getAppSchedulable() |
Long |
getContainerPreemptionTime(RMContainer container) |
Resource |
getCurrentConsumption() |
Resource |
getCurrentReservation()
Get total current reservations.
|
Resource |
getHeadroom()
Get available headroom in terms of resources for the application's user.
|
Collection<RMContainer> |
getLiveContainers()
Get the list of live containers
|
float |
getLocalityWaitFactor(Priority priority,
int clusterNodes) |
int |
getNewContainerId() |
int |
getNumReservedContainers(Priority priority) |
Set<RMContainer> |
getPreemptionContainers() |
Collection<Priority> |
getPriorities() |
Queue |
getQueue() |
String |
getQueueName() |
int |
getReReservations(Priority priority) |
List<RMContainer> |
getReservedContainers()
Get the list of reserved containers
|
Resource |
getResource(Priority priority) |
ResourceRequest |
getResourceRequest(Priority priority,
String nodeAddress) |
Map<String,ResourceRequest> |
getResourceRequests(Priority priority) |
RMContainer |
getRMContainer(ContainerId id) |
int |
getSchedulingOpportunities(Priority priority)
Return the number of times the application has been given an opportunity
to schedule a task at the given priority since the last time it
successfully did so.
|
int |
getTotalRequiredResources(Priority priority) |
String |
getUser() |
boolean |
isPending()
Is this application pending?
|
boolean |
isReserved(FSSchedulerNode node,
Priority priority)
Has the application reserved the given
node at the
given priority ? |
List<Container> |
pullNewlyAllocatedContainers() |
RMContainer |
reserve(FSSchedulerNode node,
Priority priority,
RMContainer rmContainer,
Container container) |
void |
resetAllowedLocalityLevel(Priority priority,
NodeType level)
Should be called when the scheduler assigns a container at a higher
degree of locality than the current threshold.
|
void |
resetSchedulingOpportunities(Priority priority)
Should be called when an application has successfully scheduled a container,
or when the scheduling locality threshold is relaxed.
|
void |
setAppSchedulable(AppSchedulable appSchedulable) |
void |
setHeadroom(Resource globalLimit) |
void |
showRequests() |
void |
stop(RMAppAttemptState rmAppAttemptFinalState) |
void |
unreserve(FSSchedulerNode node,
Priority priority) |
void |
updateResourceRequests(List<ResourceRequest> requests) |
public FSSchedulerApp(ApplicationAttemptId applicationAttemptId, String user, Queue queue, ActiveUsersManager activeUsersManager, RMContext rmContext)
public ApplicationId getApplicationId()
public ApplicationAttemptId getApplicationAttemptId()
SchedulerApplication
ApplicationAttemptId
of the application master.getApplicationAttemptId
in class SchedulerApplication
ApplicationAttemptId
of the application masterpublic void setAppSchedulable(AppSchedulable appSchedulable)
public AppSchedulable getAppSchedulable()
public String getUser()
public void updateResourceRequests(List<ResourceRequest> requests)
public Map<String,ResourceRequest> getResourceRequests(Priority priority)
public int getNewContainerId()
public Collection<Priority> getPriorities()
public ResourceRequest getResourceRequest(Priority priority, String nodeAddress)
public int getTotalRequiredResources(Priority priority)
public boolean isPending()
isPending
in class SchedulerApplication
public String getQueueName()
public Collection<RMContainer> getLiveContainers()
getLiveContainers
in class SchedulerApplication
public void stop(RMAppAttemptState rmAppAttemptFinalState)
public void containerLaunchedOnNode(ContainerId containerId, NodeId nodeId)
public void containerCompleted(RMContainer rmContainer, ContainerStatus containerStatus, RMContainerEventType event)
public Resource getCurrentConsumption()
public void showRequests()
public RMContainer getRMContainer(ContainerId id)
public void addSchedulingOpportunity(Priority priority)
public int getSchedulingOpportunities(Priority priority)
public int getReReservations(Priority priority)
public int getNumReservedContainers(Priority priority)
public Resource getCurrentReservation()
public RMContainer reserve(FSSchedulerNode node, Priority priority, RMContainer rmContainer, Container container)
public void unreserve(FSSchedulerNode node, Priority priority)
public boolean isReserved(FSSchedulerNode node, Priority priority)
node
at the
given priority
?node
- node to be checkedpriority
- priority of reserved containerpublic float getLocalityWaitFactor(Priority priority, int clusterNodes)
public List<RMContainer> getReservedContainers()
getReservedContainers
in class SchedulerApplication
public void setHeadroom(Resource globalLimit)
public Resource getHeadroom()
public Queue getQueue()
public void resetSchedulingOpportunities(Priority priority)
priority
- The priority of the container scheduled.public NodeType getAllowedLocalityLevel(Priority priority, int numNodes, double nodeLocalityThreshold, double rackLocalityThreshold)
public RMContainer allocate(NodeType type, FSSchedulerNode node, Priority priority, ResourceRequest request, Container container)
public void resetAllowedLocalityLevel(Priority priority, NodeType level)
public void addPreemption(RMContainer container, long time)
public Long getContainerPreemptionTime(RMContainer container)
public Set<RMContainer> getPreemptionContainers()
Copyright © 2013 Apache Software Foundation. All rights reserved.