public class ContainerScheduler extends org.apache.hadoop.service.AbstractService implements org.apache.hadoop.yarn.event.EventHandler<ContainerSchedulerEvent>
| Constructor and Description | 
|---|
| ContainerScheduler(Context context,
                  org.apache.hadoop.yarn.event.AsyncDispatcher dispatcher,
                  NodeManagerMetrics metrics)Instantiate a Container Scheduler. | 
| ContainerScheduler(Context context,
                  org.apache.hadoop.yarn.event.AsyncDispatcher dispatcher,
                  NodeManagerMetrics metrics,
                  int qLength) | 
| Modifier and Type | Method and Description | 
|---|---|
| ContainersMonitor | getContainersMonitor() | 
| org.apache.hadoop.yarn.api.records.ResourceUtilization | getCurrentUtilization() | 
| int | getNumQueuedContainers()Return number of queued containers. | 
| int | getNumQueuedGuaranteedContainers() | 
| int | getNumQueuedOpportunisticContainers() | 
| int | getNumRunningContainers() | 
| org.apache.hadoop.yarn.server.api.records.OpportunisticContainersStatus | getOpportunisticContainersStatus() | 
| int | getOpportunisticQueueCapacity()Return the capacity of the queue for opportunistic containers
 on this node. | 
| void | handle(ContainerSchedulerEvent event)Handle ContainerSchedulerEvents. | 
| void | recoverActiveContainer(Container container,
                      NMStateStoreService.RecoveredContainerState rcs)Populates auxiliary data structures used by the ContainerScheduler on
 recovery. | 
| protected void | scheduleContainer(Container container) | 
| void | serviceInit(org.apache.hadoop.conf.Configuration conf) | 
| void | setUsePauseEventForPreemption(boolean usePauseEventForPreemption) | 
| void | updateQueuingLimit(org.apache.hadoop.yarn.server.api.records.ContainerQueuingLimit limit) | 
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceStart, serviceStop, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStoppublic ContainerScheduler(Context context, org.apache.hadoop.yarn.event.AsyncDispatcher dispatcher, NodeManagerMetrics metrics)
context - NodeManager Context.dispatcher - AsyncDispatcher.metrics - NodeManagerMetrics.public ContainerScheduler(Context context, org.apache.hadoop.yarn.event.AsyncDispatcher dispatcher, NodeManagerMetrics metrics, int qLength)
public void serviceInit(org.apache.hadoop.conf.Configuration conf)
                 throws Exception
serviceInit in class org.apache.hadoop.service.AbstractServiceExceptionpublic void handle(ContainerSchedulerEvent event)
handle in interface org.apache.hadoop.yarn.event.EventHandler<ContainerSchedulerEvent>event - ContainerSchedulerEvent.public void recoverActiveContainer(Container container, NMStateStoreService.RecoveredContainerState rcs)
container - container recoveredrcs - Recovered Container statuspublic int getNumQueuedContainers()
public int getOpportunisticQueueCapacity()
public int getNumQueuedGuaranteedContainers()
public int getNumQueuedOpportunisticContainers()
public int getNumRunningContainers()
public void setUsePauseEventForPreemption(boolean usePauseEventForPreemption)
public org.apache.hadoop.yarn.server.api.records.OpportunisticContainersStatus getOpportunisticContainersStatus()
protected void scheduleContainer(Container container)
public void updateQueuingLimit(org.apache.hadoop.yarn.server.api.records.ContainerQueuingLimit limit)
public ContainersMonitor getContainersMonitor()
public org.apache.hadoop.yarn.api.records.ResourceUtilization getCurrentUtilization()
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.