java.io.Closeable, java.lang.AutoCloseable, org.apache.hadoop.service.Service, org.apache.hadoop.yarn.event.EventHandler<ContainerSchedulerEvent>public class ContainerScheduler extends org.apache.hadoop.service.AbstractService implements org.apache.hadoop.yarn.event.EventHandler<ContainerSchedulerEvent>
| Constructor | 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) |
|
ContainerScheduler(Context context,
org.apache.hadoop.yarn.event.AsyncDispatcher dispatcher,
NodeManagerMetrics metrics,
OpportunisticContainersQueuePolicy oppContainersQueuePolicy,
int qLength) |
| Modifier and Type | Method | 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.@VisibleForTesting public ContainerScheduler(Context context, org.apache.hadoop.yarn.event.AsyncDispatcher dispatcher, NodeManagerMetrics metrics, int qLength)
@VisibleForTesting public ContainerScheduler(Context context, org.apache.hadoop.yarn.event.AsyncDispatcher dispatcher, NodeManagerMetrics metrics, OpportunisticContainersQueuePolicy oppContainersQueuePolicy, int qLength)
public void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws java.lang.Exception
serviceInit in class org.apache.hadoop.service.AbstractServicejava.lang.Exceptionpublic 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()
@VisibleForTesting public int getNumQueuedGuaranteedContainers()
@VisibleForTesting public int getNumQueuedOpportunisticContainers()
@VisibleForTesting public int getNumRunningContainers()
@VisibleForTesting public void setUsePauseEventForPreemption(boolean usePauseEventForPreemption)
public org.apache.hadoop.yarn.server.api.records.OpportunisticContainersStatus getOpportunisticContainersStatus()
@VisibleForTesting protected void scheduleContainer(Container container)
public void updateQueuingLimit(org.apache.hadoop.yarn.server.api.records.ContainerQueuingLimit limit)
public ContainersMonitor getContainersMonitor()
@VisibleForTesting public org.apache.hadoop.yarn.api.records.ResourceUtilization getCurrentUtilization()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.