@InterfaceAudience.LimitedPrivate(value="yarn") @InterfaceStability.Evolving public class FifoScheduler extends AbstractYarnScheduler<FifoAppAttempt,FiCaSchedulerNode> implements org.apache.hadoop.conf.Configurable
activitiesManager, applications, EMPTY_ALLOCATION, lastNodeUpdateTime, minimumAllocation, nmExpireInterval, nmHeartbeatInterval, nodeTracker, readLock, rmContext, schedulerHealth, schedulingMonitorManager, THREAD_JOIN_TIMEOUT_MS, updateInterval, writeLock| Constructor and Description |
|---|
FifoScheduler() |
| Modifier and Type | Method and Description |
|---|---|
void |
addApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
String queue,
String user,
boolean isAppRecovering) |
void |
addApplicationAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId,
boolean transferStateFromPreviousAttempt,
boolean isAttemptRecovering) |
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.SchedulingRequest> schedulingRequests,
List<org.apache.hadoop.yarn.api.records.ContainerId> release,
List<String> blacklistAdditions,
List<String> blacklistRemovals,
ContainerUpdates updateRequests)
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.
|
protected void |
completedContainerInternal(RMContainer rmContainer,
org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus,
RMContainerEventType event) |
List<org.apache.hadoop.yarn.api.records.ApplicationAttemptId> |
getAppsInQueue(String queueName)
Gets the apps under a given queue
|
org.apache.hadoop.conf.Configuration |
getConf() |
int |
getNumClusterNodes()
Get the number of nodes available in the cluster.
|
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() |
RMContainer |
getRMContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
Get the container for the given containerId.
|
QueueMetrics |
getRootQueueMetrics()
Get the root queue for the scheduler.
|
org.apache.hadoop.yarn.api.records.Resource |
getUsedResource() |
void |
handle(SchedulerEvent event) |
void |
killContainer(RMContainer container)
Kill a RMContainer.
|
protected void |
nodeUpdate(RMNode nm)
Process a heartbeat update from a node.
|
void |
recover(RMStateStore.RMState state) |
void |
recoverContainersOnNode(List<org.apache.hadoop.yarn.server.api.protocolrecords.NMContainerStatus> containerReports,
RMNode nm) |
void |
reinitialize(org.apache.hadoop.conf.Configuration conf,
RMContext rmContext)
Re-initialize the
ResourceScheduler. |
void |
serviceInit(org.apache.hadoop.conf.Configuration conf) |
void |
serviceStart() |
void |
serviceStop() |
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
void |
setRMContext(RMContext rmContext)
Set RMContext for
ResourceScheduler. |
addQueue, asyncContainerRelease, attemptAllocationOnNode, checkAndGetApplicationLifetime, checkAndGetApplicationPriority, clearPendingContainerCache, completedContainer, containerIncreasedOnNode, containerLaunchedOnNode, createReleaseCache, createSchedContainerChangeRequests, getActivitiesManager, getApplicationAttempt, getAppResourceUsageReport, getBlacklistedNodes, getClock, getClusterResource, getCurrentAttemptForContainer, getLastNodeUpdateTime, getMaxClusterLevelAppPriority, getMaximumAllocation, getMaximumApplicationLifetime, getMaximumResourceCapability, getMaximumResourceCapability, getMinimumAllocation, getMinimumResourceCapability, getNode, getNodeIds, getNodeReport, getNodes, getNodeTracker, getNormalizedResource, getPendingResourceRequestsForAttempt, getPendingSchedulingRequestsForAttempt, getPlanQueues, getSchedulerAppInfo, getSchedulerApplications, getSchedulerHealth, getSchedulerNode, getSchedulingMonitorManager, getSchedulingResourceTypes, getTransferredContainers, handleContainerUpdates, initMaximumResourceCapability, killAllAppsInQueue, moveAllApps, moveApplication, normalizeResourceRequests, normalizeResourceRequests, preValidateMoveApplication, refreshMaximumAllocation, releaseContainers, removeQueue, resetSchedulerMetrics, rollbackContainerUpdate, setClock, setClusterMaxPriority, setEntitlement, setLastNodeUpdateTime, shouldContainersBeAutoUpdated, triggerUpdate, update, updateApplicationPriority, updateNodeResource, updateNodeResourceUtilization, updateSchedulerHealthInformationclose, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStoppublic void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws Exception
serviceInit in class AbstractYarnScheduler<FifoAppAttempt,FiCaSchedulerNode>Exceptionpublic void serviceStart()
throws Exception
serviceStart in class AbstractYarnScheduler<FifoAppAttempt,FiCaSchedulerNode>Exceptionpublic void serviceStop()
throws Exception
serviceStop in class AbstractYarnScheduler<FifoAppAttempt,FiCaSchedulerNode>Exceptionpublic void setConf(org.apache.hadoop.conf.Configuration conf)
setConf in interface org.apache.hadoop.conf.Configurablepublic org.apache.hadoop.conf.Configuration getConf()
getConf in interface org.apache.hadoop.conf.Configurablepublic int getNumClusterNodes()
YarnSchedulergetNumClusterNodes in interface YarnSchedulerpublic void setRMContext(RMContext rmContext)
ResourceSchedulerResourceScheduler.
This method should be called immediately after instantiating
a scheduler once.setRMContext in interface ResourceSchedulerrmContext - created by ResourceManagerpublic void reinitialize(org.apache.hadoop.conf.Configuration conf,
RMContext rmContext)
throws IOException
ResourceSchedulerResourceScheduler.reinitialize in interface ResourceSchedulerreinitialize in class AbstractYarnScheduler<FifoAppAttempt,FiCaSchedulerNode>conf - configurationIOExceptionpublic 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.SchedulingRequest> schedulingRequests, List<org.apache.hadoop.yarn.api.records.ContainerId> release, List<String> blacklistAdditions, List<String> blacklistRemovals, ContainerUpdates updateRequests)
YarnSchedulerallocate in interface YarnSchedulerupdateRequests - @return the Allocation for the applicationpublic void addApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
String queue,
String user,
boolean isAppRecovering)
public void addApplicationAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId,
boolean transferStateFromPreviousAttempt,
boolean isAttemptRecovering)
public void handle(SchedulerEvent event)
handle in interface org.apache.hadoop.yarn.event.EventHandler<SchedulerEvent>@Lock(value=FifoScheduler.class) protected void completedContainerInternal(RMContainer rmContainer, org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus, RMContainerEventType event)
completedContainerInternal in class AbstractYarnScheduler<FifoAppAttempt,FiCaSchedulerNode>public org.apache.hadoop.yarn.api.records.QueueInfo getQueueInfo(String queueName, boolean includeChildQueues, boolean recursive)
YarnSchedulergetQueueInfo in interface YarnSchedulerqueueName - queue nameincludeChildQueues - include child queues?recursive - get children queues?public List<org.apache.hadoop.yarn.api.records.QueueUserACLInfo> getQueueUserAclInfo()
YarnSchedulergetQueueUserAclInfo in interface YarnSchedulerpublic org.apache.hadoop.yarn.util.resource.ResourceCalculator getResourceCalculator()
getResourceCalculator in interface YarnSchedulerpublic void recover(RMStateStore.RMState state)
recover in interface Recoverablepublic RMContainer getRMContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
YarnSchedulergetRMContainer in interface YarnSchedulergetRMContainer in class AbstractYarnScheduler<FifoAppAttempt,FiCaSchedulerNode>public QueueMetrics getRootQueueMetrics()
YarnSchedulergetRootQueueMetrics in interface YarnSchedulerpublic boolean checkAccess(org.apache.hadoop.security.UserGroupInformation callerUGI,
org.apache.hadoop.yarn.api.records.QueueACL acl,
String queueName)
YarnSchedulerQueueACL.ADMINISTER_QUEUE permission,
this user can view/modify the applications in this queuecheckAccess in interface YarnSchedulertrue if the user has the permission,
false otherwisepublic List<org.apache.hadoop.yarn.api.records.ApplicationAttemptId> getAppsInQueue(String queueName)
YarnSchedulergetAppsInQueue in interface YarnSchedulerqueueName - the name of the queue.public org.apache.hadoop.yarn.api.records.Resource getUsedResource()
protected void nodeUpdate(RMNode nm)
AbstractYarnSchedulernodeUpdate in class AbstractYarnScheduler<FifoAppAttempt,FiCaSchedulerNode>nm - The RMNode corresponding to the NodeManagerpublic void killContainer(RMContainer container)
AbstractYarnSchedulerkillContainer in class AbstractYarnScheduler<FifoAppAttempt,FiCaSchedulerNode>container - the container to killpublic void recoverContainersOnNode(List<org.apache.hadoop.yarn.server.api.protocolrecords.NMContainerStatus> containerReports, RMNode nm)
recoverContainersOnNode in class AbstractYarnScheduler<FifoAppAttempt,FiCaSchedulerNode>Copyright © 2008–2022 Apache Software Foundation. All rights reserved.