Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-10977

AppMaster register UAM can lost application priority in subCluster

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • 2.9.0, 3.0.0, 3.1.0, 3.2.0, 3.3.0
    • None
    • None

    Description

      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:

      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);
       }
      

      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.

      Attachments

        1. YARN-10977.0001.patch
          27 kB
          Yao Guangdong

        Activity

          People

            yaoguangdong Yao Guangdong
            yaoguangdong Yao Guangdong
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: