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

java.lang.Object
  extended by org.apache.hadoop.yarn.server.resourcemanager.scheduler.AppSchedulingInfo

@InterfaceAudience.Private
@InterfaceStability.Unstable
public class AppSchedulingInfo
extends Object

This class keeps track of all the consumption of an application. This also keeps track of current running/completed containers for the application.


Constructor Summary
AppSchedulingInfo(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId, String user, Queue queue, ActiveUsersManager activeUsersManager)
           
 
Method Summary
 void allocate(NodeType type, SchedulerNode 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)
          Resources have been allocated to this application by the resource scheduler.
 List<org.apache.hadoop.yarn.api.records.ResourceRequest> getAllResourceRequests()
           
 org.apache.hadoop.yarn.api.records.ApplicationAttemptId getApplicationAttemptId()
           
 org.apache.hadoop.yarn.api.records.ApplicationId getApplicationId()
           
 int getNewContainerId()
           
 Collection<org.apache.hadoop.yarn.api.records.Priority> getPriorities()
           
 String getQueueName()
           
 org.apache.hadoop.yarn.api.records.Resource getResource(org.apache.hadoop.yarn.api.records.Priority priority)
           
 org.apache.hadoop.yarn.api.records.ResourceRequest getResourceRequest(org.apache.hadoop.yarn.api.records.Priority priority, String resourceName)
           
 Map<String,org.apache.hadoop.yarn.api.records.ResourceRequest> getResourceRequests(org.apache.hadoop.yarn.api.records.Priority priority)
           
 String getUser()
           
 boolean isBlacklisted(String resourceName)
           
 boolean isPending()
           
 void setQueue(Queue queue)
           
 void stop(RMAppAttemptState rmAppAttemptFinalState)
           
 void updateBlacklist(List<String> blacklistAdditions, List<String> blacklistRemovals)
          The ApplicationMaster is updating the blacklist
 void updateResourceRequests(List<org.apache.hadoop.yarn.api.records.ResourceRequest> requests)
          The ApplicationMaster is updating resource requirements for the application, by asking for more resources and releasing resources acquired by the application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AppSchedulingInfo

public AppSchedulingInfo(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId,
                         String user,
                         Queue queue,
                         ActiveUsersManager activeUsersManager)
Method Detail

getApplicationId

public org.apache.hadoop.yarn.api.records.ApplicationId getApplicationId()

getApplicationAttemptId

public org.apache.hadoop.yarn.api.records.ApplicationAttemptId getApplicationAttemptId()

getQueueName

public String getQueueName()

getUser

public String getUser()

isPending

public boolean isPending()

getNewContainerId

public int getNewContainerId()

updateResourceRequests

public void updateResourceRequests(List<org.apache.hadoop.yarn.api.records.ResourceRequest> requests)
The ApplicationMaster is updating resource requirements for the application, by asking for more resources and releasing resources acquired by the application.

Parameters:
requests - resources to be acquired

updateBlacklist

public void updateBlacklist(List<String> blacklistAdditions,
                            List<String> blacklistRemovals)
The ApplicationMaster is updating the blacklist

Parameters:
blacklistAdditions - resources to be added to the blacklist
blacklistRemovals - resources to be removed from the blacklist

getPriorities

public Collection<org.apache.hadoop.yarn.api.records.Priority> getPriorities()

getResourceRequests

public Map<String,org.apache.hadoop.yarn.api.records.ResourceRequest> getResourceRequests(org.apache.hadoop.yarn.api.records.Priority priority)

getAllResourceRequests

public List<org.apache.hadoop.yarn.api.records.ResourceRequest> getAllResourceRequests()

getResourceRequest

public org.apache.hadoop.yarn.api.records.ResourceRequest getResourceRequest(org.apache.hadoop.yarn.api.records.Priority priority,
                                                                             String resourceName)

getResource

public org.apache.hadoop.yarn.api.records.Resource getResource(org.apache.hadoop.yarn.api.records.Priority priority)

isBlacklisted

public boolean isBlacklisted(String resourceName)

allocate

public void allocate(NodeType type,
                     SchedulerNode 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)
Resources have been allocated to this application by the resource scheduler. Track them.

Parameters:
type - the type of the node
node - the nodeinfo of the node
priority - the priority of the request.
request - the request
container - the containers allocated.

stop

public void stop(RMAppAttemptState rmAppAttemptFinalState)

setQueue

public void setQueue(Queue queue)


Copyright © 2014 Apache Software Foundation. All Rights Reserved.