Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-386 [Umbrella] YARN API Changes
  3. YARN-553

Have YarnClient generate a directly usable ApplicationSubmissionContext

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.3-alpha
    • 2.1.0-beta
    • client
    • None
    • Incompatible change

    Description

      Right now, we're doing multiple steps to create a relevant ApplicationSubmissionContext for a pre-received GetNewApplicationResponse.

          GetNewApplicationResponse newApp = yarnClient.getNewApplication();
          ApplicationId appId = newApp.getApplicationId();
      
          ApplicationSubmissionContext appContext = Records.newRecord(ApplicationSubmissionContext.class);
      
          appContext.setApplicationId(appId);
      

      A simplified way may be to have the GetNewApplicationResponse itself provide a helper method that builds a usable ApplicationSubmissionContext for us. Something like:

      GetNewApplicationResponse newApp = yarnClient.getNewApplication();
      ApplicationSubmissionContext appContext = newApp.generateApplicationSubmissionContext();
      

      [The above method can also take an arg for the container launch spec, or perhaps pre-load defaults like min-resource, etc. in the returned object, aside of just associating the application ID automatically.]

      Attachments

        1. yarn-553-1.patch
          9 kB
          Karthik Kambatla
        2. yarn-553-2.patch
          9 kB
          Karthik Kambatla
        3. yarn-553-3.patch
          17 kB
          Karthik Kambatla
        4. yarn-553-4.patch
          19 kB
          Karthik Kambatla
        5. yarn-553-5.patch
          19 kB
          Karthik Kambatla
        6. yarn-553-6.patch
          19 kB
          Karthik Kambatla
        7. yarn-553-7.patch
          19 kB
          Arun Murthy

        Activity

          People

            kasha Karthik Kambatla
            qwertymaniac Harsh J
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: