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

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.3-alpha
    • Fix Version/s: 2.1.0-beta
    • Component/s: client
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: