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

getTransferredContainers in AbstractYarnScheduler should be present in YarnScheduler interface instead

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.7.0
    • 2.8.0, 3.0.0-alpha1
    • scheduler
    • None

    Description

      Currently getTransferredContainers is present in AbstractYarnScheduler.
      But in ApplicationMasterService, while registering AM, we are calling this method by typecasting it to AbstractYarnScheduler, which is incorrect.

      This method should be moved to YarnScheduler.

      Because if a custom scheduler is to be added, it will implement YarnScheduler, not AbstractYarnScheduler.
      As ApplicationMasterService is calling getTransferredContainers by typecasting it to AbstractYarnScheduler, it is imposing an indirect dependency on AbstractYarnScheduler for any pluggable custom scheduler.

      We can move the method to YarnScheduler and leave the definition in AbstractYarnScheduler as it is.

      Attachments

        1. YARN-3986.01.patch
          4 kB
          Varun Saxena
        2. YARN-3986.02.patch
          5 kB
          Varun Saxena
        3. YARN-3986.03.patch
          5 kB
          Varun Saxena

        Issue Links

          Activity

            People

              varun_saxena Varun Saxena
              varun_saxena Varun Saxena
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: