You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-dev@hadoop.apache.org by "Yao Guangdong (Jira)" <ji...@apache.org> on 2021/10/15 09:31:00 UTC

[jira] [Created] (YARN-10977) AppMaster register UAM can lost application priority in subCluster

Yao Guangdong created YARN-10977:
------------------------------------

             Summary: AppMaster register UAM can lost application priority in subCluster
                 Key: YARN-10977
                 URL: https://issues.apache.org/jira/browse/YARN-10977
             Project: Hadoop YARN
          Issue Type: Bug
          Components: amrmproxy, nodemanager, resourcemanager
    Affects Versions: 3.3.0, 3.2.0, 3.1.0, 3.0.0, 2.9.0
            Reporter: Yao Guangdong
             Fix For: 3.3.2


AppMaster register uam to subCluster can lost application priority in yarn federation cluster.Which make the subCluster's RM allocate resouce to application use default priority regardless of the application's real priority.

By analyzing the code, I found that the appMaster submitApplication to subCluster did't set the priority to ApplicationSubmissionContext. As follows:
{code:java}
private void submitUnmanagedApp(ApplicationId appId)
 throws YarnException, IOException {
 SubmitApplicationRequest submitRequest =
 this.recordFactory.newRecordInstance(SubmitApplicationRequest.class);
ApplicationSubmissionContext context = this.recordFactory
 .newRecordInstance(ApplicationSubmissionContext.class);
context.setApplicationId(appId);
 context.setApplicationName(APP_NAME + "-" + appNameSuffix);
 if (StringUtils.isBlank(this.queueName)) {
 context.setQueue(this.conf.get(DEFAULT_QUEUE_CONFIG,
 YarnConfiguration.DEFAULT_QUEUE_NAME));
 } else {
 context.setQueue(this.queueName);
 }
ContainerLaunchContext amContainer =
 this.recordFactory.newRecordInstance(ContainerLaunchContext.class);
 Resource resource = BuilderUtils.newResource(1024, 1);
 context.setResource(resource);
 context.setAMContainerSpec(amContainer);
 submitRequest.setApplicationSubmissionContext(context);
context.setUnmanagedAM(true);
 context.setKeepContainersAcrossApplicationAttempts(
 this.keepContainersAcrossApplicationAttempts);
LOG.info("Submitting unmanaged application {}", appId);
 this.rmClient.submitApplication(submitRequest);
 }
{code}
Finnally, I fixed this by set application's priority to the ApplicationSubmissionContext.  The priority which from the homeCluster's response when register appMaster to homeCluster's RM.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-dev-help@hadoop.apache.org