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

ASF GitHub Bot commented on YARN-11641:
---------------------------------------

hadoop-yetus commented on PR #6435:
URL: https://github.com/apache/hadoop/pull/6435#issuecomment-1885276837

   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |:----:|----------:|--------:|:--------:|:-------:|
   | +0 :ok: |  reexec  |   0m 23s |  |  Docker mode activated.  |
   |||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  0s |  |  codespell was not available.  |
   | +0 :ok: |  detsecrets  |   0m  0s |  |  detect-secrets was not available.  
|
   | +0 :ok: |  jsonlint  |   0m  0s |  |  jsonlint was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 43 new or modified test files.  |
   |||| _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  36m 34s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |   0m 34s |  |  trunk passed with JDK 
Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  compile  |   0m 31s |  |  trunk passed with JDK 
Private Build-1.8.0_392-8u392-ga-1~20.04-b08  |
   | +1 :green_heart: |  checkstyle  |   0m 31s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   0m 31s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   0m 35s |  |  trunk passed with JDK 
Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  javadoc  |   0m 31s |  |  trunk passed with JDK 
Private Build-1.8.0_392-8u392-ga-1~20.04-b08  |
   | +1 :green_heart: |  spotbugs  |   1m 11s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  26m 51s |  |  branch has no errors 
when building and testing our client artifacts.  |
   |||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   0m 26s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 30s |  |  the patch passed with JDK 
Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  javac  |   0m 30s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 25s |  |  the patch passed with JDK 
Private Build-1.8.0_392-8u392-ga-1~20.04-b08  |
   | +1 :green_heart: |  javac  |   0m 25s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | -0 :warning: |  checkstyle  |   0m 25s | 
[/results-checkstyle-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6435/1/artifact/out/results-checkstyle-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt)
 |  
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager:
 The patch generated 5 new + 29 unchanged - 0 fixed = 34 total (was 29)  |
   | +1 :green_heart: |  mvnsite  |   0m 29s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   0m 26s |  |  the patch passed with JDK 
Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  javadoc  |   0m 24s |  |  the patch passed with JDK 
Private Build-1.8.0_392-8u392-ga-1~20.04-b08  |
   | +1 :green_heart: |  spotbugs  |   1m 11s |  |  the patch passed  |
   | -1 :x: |  shadedclient  |  29m 58s |  |  patch has errors when building 
and testing our client artifacts.  |
   |||| _ Other Tests _ |
   | -1 :x: |  unit  |  15m 49s | 
[/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6435/1/artifact/out/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt)
 |  hadoop-yarn-server-resourcemanager in the patch passed.  |
   | +0 :ok: |  asflicense  |   0m 22s |  |  ASF License check generated no 
output?  |
   |  |   | 120m 13s |  |  |
   
   
   | Reason | Tests |
   |-------:|:------|
   | Failed junit tests | 
hadoop.yarn.server.resourcemanager.TestLeaderElectorService |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.43 ServerAPI=1.43 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6435/1/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/6435 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets jsonlint |
   | uname | Linux c2206127136b 5.15.0-88-generic #98-Ubuntu SMP Mon Oct 2 
15:18:56 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / 48346c5ebe41d46d2bd03534c91be6714f2cf7cd |
   | Default Java | Private Build-1.8.0_392-8u392-ga-1~20.04-b08 |
   | Multi-JDK versions | 
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.21+9-post-Ubuntu-0ubuntu120.04 
/usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_392-8u392-ga-1~20.04-b08 |
   |  Test Results | 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6435/1/testReport/ |
   | Max. process+thread count | 557 (vs. ulimit of 5500) |
   | modules | C: 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager
 U: 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager
 |
   | Console output | 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6435/1/console |
   | versions | git=2.25.1 maven=3.6.3 spotbugs=4.2.2 |
   | Powered by | Apache Yetus 0.14.0 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   




> Can't update a queue hierarchy in absolute mode when the configured 
> capacities are zero
> ---------------------------------------------------------------------------------------
>
>                 Key: YARN-11641
>                 URL: https://issues.apache.org/jira/browse/YARN-11641
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: capacityscheduler
>    Affects Versions: 3.4.0
>            Reporter: Tamas Domok
>            Assignee: Tamas Domok
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: hierarchy.png
>
>
> h2. Error symptoms
> It is not possible to modify a queue hierarchy in absolute mode when the 
> parent or every child queue of the parent has 0 min resource configured.
> {noformat}
> 2024-01-05 15:38:59,016 INFO 
> org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacitySchedulerQueueManager:
>  Initialized queue: root.a.c
> 2024-01-05 15:38:59,016 ERROR 
> org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServices: Exception 
> thrown when modifying configuration.
> java.io.IOException: Failed to re-init queues : Parent=root.a: When absolute 
> minResource is used, we must make sure both parent and child all use absolute 
> minResource
> {noformat}
> h2. Reproduction
> capacity-scheduler.xml
> {code:xml}
> <?xml version="1.0"?>
> <configuration>
>   <property>
>     <name>yarn.scheduler.capacity.root.queues</name>
>     <value>default,a</value>
>   </property>
>   <property>
>     <name>yarn.scheduler.capacity.root.capacity</name>
>     <value>[memory=40960, vcores=16]</value>
>   </property>
>   <property>
>     <name>yarn.scheduler.capacity.root.default.capacity</name>
>     <value>[memory=1024, vcores=1]</value>
>   </property>
>   <property>
>     <name>yarn.scheduler.capacity.root.default.maximum-capacity</name>
>     <value>[memory=1024, vcores=1]</value>
>   </property>
>   <property>
>     <name>yarn.scheduler.capacity.root.a.capacity</name>
>     <value>[memory=0, vcores=0]</value>
>   </property>
>   <property>
>     <name>yarn.scheduler.capacity.root.a.maximum-capacity</name>
>     <value>[memory=39936, vcores=15]</value>
>   </property>
>   <property>
>     <name>yarn.scheduler.capacity.root.a.queues</name>
>     <value>b,c</value>
>   </property>
>   <property>
>     <name>yarn.scheduler.capacity.root.a.b.capacity</name>
>     <value>[memory=0, vcores=0]</value>
>   </property>
>   <property>
>     <name>yarn.scheduler.capacity.root.a.b.maximum-capacity</name>
>     <value>[memory=39936, vcores=15]</value>
>   </property>
>   <property>
>     <name>yarn.scheduler.capacity.root.a.c.capacity</name>
>     <value>[memory=0, vcores=0]</value>
>   </property>
>   <property>
>     <name>yarn.scheduler.capacity.root.a.c.maximum-capacity</name>
>     <value>[memory=39936, vcores=15]</value>
>   </property>
> </configuration>
> {code}
>  !hierarchy.png! 
> updatequeue.xml
> {code:xml}
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <sched-conf>
> <update-queue>
>   <queue-name>root.a</queue-name>
>   <params>
>     <entry>
>       <key>capacity</key>
>       <value>[memory=1024,vcores=1]</value>
>     </entry>
>     <entry>
>       <key>maximum-capacity</key>
>       <value>[memory=39936,vcores=15]</value>
>     </entry>
>   </params>
> </update-queue>
> </sched-conf>
> {code}
> {code}
> $ curl -X PUT -H 'Content-Type: application/xml' -d @updatequeue.xml 
> http://localhost:8088/ws/v1/cluster/scheduler-conf\?user.name\=yarn
> Failed to re-init queues : Parent=root.a: When absolute minResource is used, 
> we must make sure both parent and child all use absolute minResource
> {code}
> h2. Root cause
> setChildQueues is called during reinit, where:
> {code:java}
>   void setChildQueues(Collection<CSQueue> childQueues) throws IOException {
>     writeLock.lock();
>     try {
>       boolean isLegacyQueueMode = 
> queueContext.getConfiguration().isLegacyQueueMode();
>       if (isLegacyQueueMode) {
>         QueueCapacityType childrenCapacityType =
>             getCapacityConfigurationTypeForQueues(childQueues);
>         QueueCapacityType parentCapacityType =
>             getCapacityConfigurationTypeForQueues(ImmutableList.of(this));
>         if (childrenCapacityType == QueueCapacityType.ABSOLUTE_RESOURCE
>             || parentCapacityType == QueueCapacityType.ABSOLUTE_RESOURCE) {
>           // We don't allow any mixed absolute + {weight, percentage} between
>           // children and parent
>           if (childrenCapacityType != parentCapacityType && 
> !this.getQueuePath()
>               .equals(CapacitySchedulerConfiguration.ROOT)) {
>             throw new IOException("Parent=" + this.getQueuePath()
>                 + ": When absolute minResource is used, we must make sure 
> both "
>                 + "parent and child all use absolute minResource");
>           }
> {code}
> The parent or childrenCapacityType will be considered as PERCENTAGE, because 
> getCapacityConfigurationTypeForQueues fails to detect the absolute mode, here:
> {code:java}
>         if 
> (!queue.getQueueResourceQuotas().getConfiguredMinResource(nodeLabel)
>             .equals(Resources.none())) {
>           absoluteMinResSet = true;
> {code}
> (It only happens in legacy queue mode.)
> h2. Possible fixes
> Possible fix in AbstractParentQueue.getCapacityConfigurationTypeForQueues 
> using the capacityVector:
> {code:java}
>     for (CSQueue queue : queues) {
>       for (String nodeLabel : queueCapacities.getExistingNodeLabels()) {
>         Set<QueueCapacityVector.ResourceUnitCapacityType> 
> definedCapacityTypes =
>             
> queue.getConfiguredCapacityVector(nodeLabel).getDefinedCapacityTypes();
>         if (definedCapacityTypes.size() == 1) {
>           QueueCapacityVector.ResourceUnitCapacityType next = 
> definedCapacityTypes.iterator().next();
>           if (Objects.requireNonNull(next) == PERCENTAGE) {
>             percentageIsSet = true;
>             diagMsg.append("{Queue=").append(queue.getQueuePath()).append(", 
> label=").append(nodeLabel)
>                 .append(" uses percentage mode}. ");
>           } else if (next == 
> QueueCapacityVector.ResourceUnitCapacityType.ABSOLUTE) {
>             absoluteMinResSet = true;
>             diagMsg.append("{Queue=").append(queue.getQueuePath()).append(", 
> label=").append(nodeLabel)
>                 .append(" uses absolute mode}. ");
>           } else if (next == 
> QueueCapacityVector.ResourceUnitCapacityType.WEIGHT) {
>             weightIsSet = true;
>             diagMsg.append("{Queue=").append(queue.getQueuePath()).append(", 
> label=").append(nodeLabel)
>                 .append(" uses weight mode}. ");
>           }
>         } else if (definedCapacityTypes.size() > 1) {
>           mixedIsSet = true;
>           diagMsg.append("{Queue=").append(queue.getQueuePath()).append(", 
> label=").append(nodeLabel)
>               .append(" uses mixed mode}. ");
>         }
>       }
>     }
> {code}
> Pre capacityVector, we could utilise checkConfigTypeIsAbsoluteResource, e.g.:
> {code:java}
> -        if 
> (!queue.getQueueResourceQuotas().getConfiguredMinResource(nodeLabel)
> -            .equals(Resources.none())) {
> +        if (checkConfigTypeIsAbsoluteResource(queue.getQueuePath(), 
> nodeLabel)) {
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
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