Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-117 Enhance YARN service model
  3. YARN-804

mark AbstractService init/start/stop methods as final

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 2.1.0-beta
    • None
    • api
    • None

    Description

      Now that YARN-117 and MAPREDUCE-5298 are checked in, we can mark the public AbstractService init/start/stop methods as final.

      Why? It puts the lifecycle check and error handling around the subclass code, ensuring no lifecycle method gets called in the wrong state or gets called more than once.When a serviceInit(), serviceStart() & serviceStop() method throws an exception, it's caught and auto-triggers stop.

      Marking the methods as final forces service implementations to move to the stricter lifecycle. It has one side effect: some of the mocking tests play up -I'll need some assistance here

      Attachments

        1. YARN-804-001.patch
          2 kB
          Steve Loughran

        Issue Links

          Activity

            People

              vinodkv Vinod Kumar Vavilapalli
              stevel@apache.org Steve Loughran
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: