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

Clean up lock-try order in fair scheduler

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0-alpha4
    • 3.2.0
    • fairscheduler
    • Reviewed

    Description

      There are many places that follow the pattern:

      try {
        lock.lock();
        ...
      } finally {
        lock.unlock();
      }

      There are a couple of reasons that's a bad idea. The correct pattern is:

      lock.lock();
      try {
        ...
      } finally {
        lock.unlock();
      }

      Attachments

        1. YARN-7133.001.patch
          8 kB
          Szilard Nemeth

        Activity

          People

            snemeth Szilard Nemeth
            templedf Daniel Templeton
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: