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

Set default capacity of root for node labels

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.4.0, 3.2.3, 3.3.2
    • 3.4.0, 3.2.3, 3.3.2
    • capacity scheduler
    • None

    Description

      CapacitySchedulerConfiguration#getNonLabeledQueueCapacity handles root in the following way:

      if (absoluteResourceConfigured || configuredWeightAsCapacity(
              configuredCapacity)) {
            // Return capacity in percentage as 0 for non-root queues and 100 for
            // root.From AbstractCSQueue, absolute resource will be parsed and
            // updated. Once nodes are added/removed in cluster, capacity in
            // percentage will also be re-calculated.
            return queue.equals("root") ? 100.0f : 0f;
          }
      

      CapacitySchedulerConfiguration#internalGetLabeledQueueCapacity on the other hand does not take root queue into consideration:

      if (absoluteResourceConfigured || configuredWeightAsCapacity(
              configuredCapacity)) {
            // Return capacity in percentage as 0 for non-root queues and 100 for
            // root.From AbstractCSQueue, absolute resource, and weight will be parsed
            // and updated separately. Once nodes are added/removed in cluster,
            // capacity is percentage will also be re-calculated.
            return defaultValue;
          }
      
          float capacity = getFloat(capacityPropertyName, defaultValue);
      

      Due to this, labeled root capacity is 0, which is not set in in AbstractCSQueue#derivedCapacityFromAbsoluteConfigurations, because root is never in Absolute mode.

      Attachments

        1. YARN-10813.001.patch
          2 kB
          Andras Gyori
        2. YARN-10813.branch-3.2.001.patch
          2 kB
          Andras Gyori
        3. YARN-10813.branch-3.3.001.patch
          2 kB
          Andras Gyori

        Issue Links

          Activity

            People

              gandras Andras Gyori
              gandras Andras Gyori
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: