@InterfaceAudience.LimitedPrivate(value="yarn") @InterfaceStability.Evolving public class FifoScheduler extends AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode> implements org.apache.hadoop.conf.Configurable
applications, clusterResource, EMPTY_ALLOCATION, EMPTY_CONTAINER_LIST, maximumAllocation, minimumAllocation, nmExpireInterval, nodes, rmContext
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.ContainerId> release,
List<String> blacklistAdditions,
List<String> blacklistRemovals,
List<org.apache.hadoop.yarn.api.records.UpdateContainerRequest> increaseRequests,
List<org.apache.hadoop.yarn.api.records.UpdateContainerRequest> decreaseRequests)
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) |
protected void |
decreaseContainer(SchedContainerChangeRequest decreaseRequest,
SchedulerApplicationAttempt attempt) |
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 |
recover(RMStateStore.RMState state) |
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 . |
addBlacklistedNodeIdsToList, addQueue, checkAndGetApplicationPriority, clearPendingContainerCache, completedContainer, containerIncreasedOnNode, containerLaunchedOnNode, createReleaseCache, createSchedContainerChangeRequests, decreaseContainers, getApplicationAttempt, getAppResourceUsageReport, getClusterResource, getCurrentAttemptForContainer, getMaxClusterLevelAppPriority, getMaximumResourceCapability, getMaximumResourceCapability, getMinimumResourceCapability, getNodeReport, getPendingResourceRequestsForAttempt, getPlanQueues, getSchedulerAppInfo, getSchedulerApplications, getSchedulerNode, getSchedulingResourceTypes, getTransferredContainers, initMaximumResourceCapability, killAllAppsInQueue, moveAllApps, moveApplication, recoverContainersOnNode, refreshMaximumAllocation, releaseContainers, removeQueue, setClusterMaxPriority, setEntitlement, updateApplicationPriority, updateMaximumAllocation, updateNodeResource
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
public void serviceInit(org.apache.hadoop.conf.Configuration conf) throws Exception
serviceInit
in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>
Exception
public void serviceStart() throws Exception
serviceStart
in class org.apache.hadoop.service.AbstractService
Exception
public void serviceStop() throws Exception
serviceStop
in class org.apache.hadoop.service.AbstractService
Exception
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
public org.apache.hadoop.conf.Configuration getConf()
getConf
in interface org.apache.hadoop.conf.Configurable
public int getNumClusterNodes()
YarnScheduler
getNumClusterNodes
in interface YarnScheduler
public void setRMContext(RMContext rmContext)
ResourceScheduler
ResourceScheduler
.
This method should be called immediately after instantiating
a scheduler once.setRMContext
in interface ResourceScheduler
rmContext
- created by ResourceManagerpublic void reinitialize(org.apache.hadoop.conf.Configuration conf, RMContext rmContext) throws IOException
ResourceScheduler
ResourceScheduler
.reinitialize
in interface ResourceScheduler
conf
- configurationIOException
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, List<org.apache.hadoop.yarn.api.records.UpdateContainerRequest> increaseRequests, List<org.apache.hadoop.yarn.api.records.UpdateContainerRequest> decreaseRequests)
YarnScheduler
allocate
in interface YarnScheduler
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<FiCaSchedulerApp,FiCaSchedulerNode>
public org.apache.hadoop.yarn.api.records.QueueInfo getQueueInfo(String queueName, boolean includeChildQueues, boolean recursive)
YarnScheduler
getQueueInfo
in interface YarnScheduler
queueName
- queue nameincludeChildQueues
- include child queues?recursive
- get children queues?public List<org.apache.hadoop.yarn.api.records.QueueUserACLInfo> getQueueUserAclInfo()
YarnScheduler
getQueueUserAclInfo
in interface YarnScheduler
public org.apache.hadoop.yarn.util.resource.ResourceCalculator getResourceCalculator()
getResourceCalculator
in interface YarnScheduler
public void recover(RMStateStore.RMState state)
recover
in interface Recoverable
public RMContainer getRMContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
YarnScheduler
getRMContainer
in interface YarnScheduler
getRMContainer
in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>
public QueueMetrics getRootQueueMetrics()
YarnScheduler
getRootQueueMetrics
in interface YarnScheduler
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 queuecheckAccess
in interface YarnScheduler
true
if the user has the permission,
false
otherwisepublic List<org.apache.hadoop.yarn.api.records.ApplicationAttemptId> getAppsInQueue(String queueName)
YarnScheduler
getAppsInQueue
in interface YarnScheduler
queueName
- the name of the queue.public org.apache.hadoop.yarn.api.records.Resource getUsedResource()
protected void decreaseContainer(SchedContainerChangeRequest decreaseRequest, SchedulerApplicationAttempt attempt)
decreaseContainer
in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>
Copyright © 2017 Apache Software Foundation. All Rights Reserved.