Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-10889 [Umbrella] Queue Creation in Capacity Scheduler - Tech debts
  3. YARN-10953

Make CapacityScheduler#getOrCreateQueueFromPlacementContext easier to comprehend

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      1. Most of the method body is wrapped in an if-statement that checks if the queue is null. We could negate this and return immediately if the queue != null, so we don't need a large if statement.
      2. Similarly in that large if body, there's a check for fallbackContext.hasParentQueue(). If it's true, we are having yet another large if-body. We should also negate this condition and return immediately if it's false.

      Attachments

        Issue Links

          Activity

            People

              gandras Andras Gyori
              snemeth Szilard Nemeth
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 50m
                  1h 50m