[ 
https://issues.apache.org/jira/browse/YARN-10364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17169812#comment-17169812
 ] 

Prabhu Joseph commented on YARN-10364:
--------------------------------------

Thanks [~BilwaST] for the patch. Have a comment in below section

1. AbstractCSQueue#validateAbsoluteVsPercentageCapacityConfig will always 
succeed as it compares localType copied from this.capacityConfigType with the 
same this.capacityConfigType.

It has to compare the type (this.capacityConfigType) of previous node label 
with the new one derived using minResource of next node label. Like below.

{code}
  private void validateAbsoluteVsPercentageCapacityConfig(
      String queuePath, String label) {
        CapacityConfigType localType = 
checkConfigTypeIsAbsoluteResource(queuePath,
        label) ? CapacityConfigType.ABSOLUTE_RESOURCE : 
CapacityConfigType.PERCENTAGE;
    if (!queuePath.equals("root")
        && !this.capacityConfigType.equals(localType)) {
      throw new IllegalArgumentException("Queue '" + getQueuePath()
          + "' should use either percentage based capacity"
          + " configuration or absolute resource.");
    }
  }
{code}  


> Absolute Resource [memory=0] is considered as Percentage config type
> --------------------------------------------------------------------
>
>                 Key: YARN-10364
>                 URL: https://issues.apache.org/jira/browse/YARN-10364
>             Project: Hadoop YARN
>          Issue Type: Bug
>    Affects Versions: 3.4.0
>            Reporter: Prabhu Joseph
>            Assignee: Bilwa S T
>            Priority: Major
>         Attachments: YARN-10364.001.patch, YARN-10364.002.patch
>
>
> Absolute Resource [memory=0] is considered as Percentage config type. This 
> causes failure while converting queues from Percentage to Absolute Resources 
> automatically. 
> *Repro:*
> 1. Queue A = 100% and child queues Queue A.B = 0%, A.C=100%
> 2. While converting above to absolute resource automatically, capacity of 
> queue A = [memory=<cluster resource>], A.B = [memory=0]
> This fails with below as A is considered as Absolute Resource whereas B is 
> considered as Percentage config type.
> {code}
> 2020-07-23 09:36:40,499 WARN 
> org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServices: 
> CapacityScheduler configuration validation failed:java.io.IOException: Failed 
> to re-init queues : Parent queue 'root.A' and child queue 'root.A.B' should 
> use either percentage based capacityconfiguration or absolute resource 
> together for label:
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to