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

FairScheduler can assign more resources to queue with MaxShare set.

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.5.0
    • Fix Version/s: None
    • Component/s: fairscheduler
    • Labels:
      None
    • Target Version/s:

      Description

      method fair.FSQueue#assignContainerPreCheck() uses Resources.fitsIn incorrectly, because if queue is at its maximum capacity method returns true and container can be assigned to queue with maximum resources already consumed.
      That is because fitsIn code do '<=' comparison and if allocated resources == max resources fitsIn still returns true, and consequently pre check successes

        public static boolean fitsIn(Resource smaller, Resource bigger) {
          return smaller.getMemory() <= bigger.getMemory() &&
              smaller.getVirtualCores() <= bigger.getVirtualCores();
        }
      

      Provided patch introduced Resources.less method, it more lightweight then lessThan.

        Attachments

        1. YARN-2145.diff
          3 kB
          Andrey Stepachev

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              octo47 Andrey Stepachev

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment