[
https://issues.apache.org/jira/browse/MAPREDUCE-7365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yao Guangdong resolved MAPREDUCE-7365.
--------------------------------------
Resolution: Abandoned
> AppMaster register UAM can lost application priority in subCluster
> -------------------------------------------------------------------
>
> Key: MAPREDUCE-7365
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-7365
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Components: applicationmaster, nodemanager, resourcemanager, yarn
> Affects Versions: 2.9.0, 3.0.0, 3.1.0, 3.3.0
> Reporter: Yao Guangdong
> Priority: Major
> 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: [email protected]
For additional commands, e-mail: [email protected]