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

Cleanup leader election configs and pluggability


    • Type: Improvement
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.8.0
    • Fix Version/s: 2.8.0, 3.0.0-alpha2
    • Component/s: resourcemanager
    • Labels:


      While reviewing YARN-5677 and YARN-5694, I noticed we could make the curator-based election code cleaner. It is nicer to get this fixed in 2.8 before we ship it, but this can be done at a later time as well.

      1. By EmbeddedElector, we meant it was running as part of the RM daemon. Since the Curator-based elector is also running embedded, I feel the code should be checking for !curatorBased instead of isEmbeddedElector
      2. LeaderElectorService should probably be named CuratorBasedEmbeddedElectorService or some such.
      3. The code that initializes the elector should be at the same place irrespective of whether it is curator-based or not.
      4. We seem to be caching the CuratorFramework instance in RM. It makes more sense for it to be in RMContext. If others are okay with it, we might even be better of having RMContext#getCurator() method to lazily create the curator framework and then cache it.


        1. yarn-5709.1.patch
          52 kB
          Karthik Kambatla
        2. yarn-5709-wip.2.patch
          61 kB
          Karthik Kambatla
        3. yarn-5709.2.patch
          40 kB
          Karthik Kambatla
        4. yarn-5709.3.patch
          40 kB
          Karthik Kambatla
        5. yarn-5709.4.patch
          43 kB
          Karthik Kambatla
        6. yarn-5709-branch-2.8.patch
          42 kB
          Karthik Kambatla
        7. yarn-5709-branch-2.8.01.patch
          64 kB
          Jian He
        8. yarn-5709-branch-2.8.02.patch
          64 kB
          Jian He
        9. yarn-5709-branch-2.8.03.patch
          64 kB
          Daniel Templeton

          Issue Links



              • Assignee:
                kasha Karthik Kambatla
                kasha Karthik Kambatla
              • Votes:
                0 Vote for this issue
                9 Start watching this issue


                • Created: