|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler
@InterfaceAudience.LimitedPrivate(value="yarn") @InterfaceStability.Evolving public class CapacityScheduler
Field Summary | |
---|---|
protected Map<org.apache.hadoop.yarn.api.records.ApplicationAttemptId,FiCaSchedulerApp> |
applications
|
static String |
ROOT_QUEUE
|
Constructor Summary | |
---|---|
CapacityScheduler()
|
Method Summary | |
---|---|
Allocation |
allocate(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId,
List<org.apache.hadoop.yarn.api.records.ResourceRequest> ask,
List<org.apache.hadoop.yarn.api.records.ContainerId> release,
List<String> blacklistAdditions,
List<String> blacklistRemovals)
The main api between the ApplicationMaster and the Scheduler. |
boolean |
checkAccess(org.apache.hadoop.security.UserGroupInformation callerUGI,
org.apache.hadoop.yarn.api.records.QueueACL acl,
String queueName)
Check if the user has permission to perform the operation. |
void |
dropContainerReservation(RMContainer container)
If the scheduler support container reservations, this method is used to ask the scheduler to drop the reservation for the given container. |
Comparator<FiCaSchedulerApp> |
getApplicationComparator()
|
org.apache.hadoop.yarn.api.records.Resource |
getClusterResources()
|
org.apache.hadoop.conf.Configuration |
getConf()
Get the yarn configuration. |
CapacitySchedulerConfiguration |
getConfiguration()
|
RMContainerTokenSecretManager |
getContainerTokenSecretManager()
|
org.apache.hadoop.yarn.api.records.Resource |
getMaximumResourceCapability()
Get maximum allocatable Resource . |
org.apache.hadoop.yarn.api.records.Resource |
getMinimumResourceCapability()
Get minimum allocatable Resource . |
SchedulerNodeReport |
getNodeReport(org.apache.hadoop.yarn.api.records.NodeId nodeId)
Get node resource usage report. |
int |
getNumClusterNodes()
Get the number of nodes available in the cluster. |
Comparator<CSQueue> |
getQueueComparator()
|
org.apache.hadoop.yarn.api.records.QueueInfo |
getQueueInfo(String queueName,
boolean includeChildQueues,
boolean recursive)
Get queue information |
List<org.apache.hadoop.yarn.api.records.QueueUserACLInfo> |
getQueueUserAclInfo()
Get acls for queues for current user. |
org.apache.hadoop.yarn.util.resource.ResourceCalculator |
getResourceCalculator()
|
RMContext |
getRMContext()
|
CSQueue |
getRootQueue()
|
QueueMetrics |
getRootQueueMetrics()
Get the root queue for the scheduler. |
SchedulerAppReport |
getSchedulerAppInfo(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId)
Get the Scheduler app for a given app attempt Id. |
void |
handle(SchedulerEvent event)
|
void |
killContainer(RMContainer cont)
Ask the scheduler to forcibly interrupt the container given as input |
void |
preemptContainer(org.apache.hadoop.yarn.api.records.ApplicationAttemptId aid,
RMContainer cont)
Ask the scheduler to obtain back the container from a specific application by issuing a preemption request |
void |
recover(RMStateStore.RMState state)
|
void |
reinitialize(org.apache.hadoop.conf.Configuration conf,
RMContext rmContext)
Re-initialize the ResourceScheduler . |
void |
setConf(org.apache.hadoop.conf.Configuration conf)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Map<org.apache.hadoop.yarn.api.records.ApplicationAttemptId,FiCaSchedulerApp> applications
@InterfaceAudience.Private public static final String ROOT_QUEUE
Constructor Detail |
---|
public CapacityScheduler()
Method Detail |
---|
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
public org.apache.hadoop.conf.Configuration getConf()
CapacitySchedulerContext
getConf
in interface org.apache.hadoop.conf.Configurable
getConf
in interface CapacitySchedulerContext
public QueueMetrics getRootQueueMetrics()
YarnScheduler
getRootQueueMetrics
in interface YarnScheduler
public CSQueue getRootQueue()
public CapacitySchedulerConfiguration getConfiguration()
getConfiguration
in interface CapacitySchedulerContext
public RMContainerTokenSecretManager getContainerTokenSecretManager()
getContainerTokenSecretManager
in interface CapacitySchedulerContext
public org.apache.hadoop.yarn.api.records.Resource getMinimumResourceCapability()
YarnScheduler
Resource
.
getMinimumResourceCapability
in interface CapacitySchedulerContext
getMinimumResourceCapability
in interface YarnScheduler
public org.apache.hadoop.yarn.api.records.Resource getMaximumResourceCapability()
YarnScheduler
Resource
.
getMaximumResourceCapability
in interface CapacitySchedulerContext
getMaximumResourceCapability
in interface YarnScheduler
public Comparator<FiCaSchedulerApp> getApplicationComparator()
getApplicationComparator
in interface CapacitySchedulerContext
public org.apache.hadoop.yarn.util.resource.ResourceCalculator getResourceCalculator()
getResourceCalculator
in interface CapacitySchedulerContext
public Comparator<CSQueue> getQueueComparator()
getQueueComparator
in interface CapacitySchedulerContext
public int getNumClusterNodes()
YarnScheduler
getNumClusterNodes
in interface CapacitySchedulerContext
getNumClusterNodes
in interface YarnScheduler
public RMContext getRMContext()
getRMContext
in interface CapacitySchedulerContext
public org.apache.hadoop.yarn.api.records.Resource getClusterResources()
getClusterResources
in interface CapacitySchedulerContext
public void reinitialize(org.apache.hadoop.conf.Configuration conf, RMContext rmContext) throws IOException
ResourceScheduler
ResourceScheduler
.
reinitialize
in interface ResourceScheduler
conf
- configuration
IOException
@Lock(value=org.apache.hadoop.yarn.server.utils.Lock.NoLock.class) public Allocation allocate(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId, List<org.apache.hadoop.yarn.api.records.ResourceRequest> ask, List<org.apache.hadoop.yarn.api.records.ContainerId> release, List<String> blacklistAdditions, List<String> blacklistRemovals)
YarnScheduler
allocate
in interface YarnScheduler
Allocation
for the application@Lock(value=org.apache.hadoop.yarn.server.utils.Lock.NoLock.class) public org.apache.hadoop.yarn.api.records.QueueInfo getQueueInfo(String queueName, boolean includeChildQueues, boolean recursive) throws IOException
YarnScheduler
getQueueInfo
in interface YarnScheduler
queueName
- queue nameincludeChildQueues
- include child queues?recursive
- get children queues?
IOException
@Lock(value=org.apache.hadoop.yarn.server.utils.Lock.NoLock.class) public List<org.apache.hadoop.yarn.api.records.QueueUserACLInfo> getQueueUserAclInfo()
YarnScheduler
getQueueUserAclInfo
in interface YarnScheduler
public void handle(SchedulerEvent event)
handle
in interface org.apache.hadoop.yarn.event.EventHandler<SchedulerEvent>
public SchedulerAppReport getSchedulerAppInfo(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId)
YarnScheduler
getSchedulerAppInfo
in interface YarnScheduler
applicationAttemptId
- the id of the application attempt
@Lock(value=org.apache.hadoop.yarn.server.utils.Lock.NoLock.class) public void recover(RMStateStore.RMState state) throws Exception
recover
in interface Recoverable
Exception
public SchedulerNodeReport getNodeReport(org.apache.hadoop.yarn.api.records.NodeId nodeId)
YarnScheduler
getNodeReport
in interface YarnScheduler
SchedulerNodeReport
for the node or null
if nodeId does not point to a defined node.public void dropContainerReservation(RMContainer container)
PreemptableResourceScheduler
dropContainerReservation
in interface PreemptableResourceScheduler
container
- Reference to reserved container allocation.public void preemptContainer(org.apache.hadoop.yarn.api.records.ApplicationAttemptId aid, RMContainer cont)
PreemptableResourceScheduler
preemptContainer
in interface PreemptableResourceScheduler
aid
- the application from which we want to get a container backcont
- the container we want backpublic void killContainer(RMContainer cont)
PreemptableResourceScheduler
killContainer
in interface PreemptableResourceScheduler
public boolean checkAccess(org.apache.hadoop.security.UserGroupInformation callerUGI, org.apache.hadoop.yarn.api.records.QueueACL acl, String queueName)
YarnScheduler
QueueACL.ADMINISTER_QUEUE
permission,
this user can view/modify the applications in this queue
checkAccess
in interface YarnScheduler
true
if the user has the permission,
false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |