-
Notifications
You must be signed in to change notification settings - Fork 9.2k
YARN-11000. Replace queue resource calculation logic in updateClusterResource #5783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…Resource Change-Id: If92b4fb22e66d7f9318bf10419990672ee988c6a
|
💔 -1 overall
This message was automatically generated. |
Change-Id: I7cb6cb73293c4368c69b9344923e60a3297b9a94
Change-Id: Ibb6673638faeaad6f0f9b677d9f75e47132967be
… THIS) Change-Id: I944fda71addcbe13d1665d440317b71daf11697b
|
💔 -1 overall
This message was automatically generated. |
… (REVERT THIS)" This reverts commit da47ec6.
Change-Id: I0a4f9c2460facda9dacf7d2845f58c2d9de589f5
Change-Id: Ie55a648ddde96cad76068b251fcfa8ad86ee4947
Change-Id: Ie7a14bb2bc5a5a928bcb6db5360bdcf94177e96a
This fixes the test issue: testDynamicAutoCreatedQueueRecoveryWithDefaultQueue (clusterResource was zero during the failover) Change-Id: I8341ef2d2364fe6b3a6b5c36624fd4053ac6ac16
…ue between the new and legacy queue mode Change-Id: I4d06b10d016c3a4386fe7261a1e322a57e41420f
Change-Id: I96dc7b9bb4c6695b943a979a979d75936f091b6a
Change-Id: I014fdc581ccfbc21ece7d20886d22c232c7b0a91
|
🎊 +1 overall
This message was automatically generated. |
Change-Id: Ib93930e95e009d81122fdf640a01389bb88fba20
This reverts commit d9c9945.
|
Note: +1 Overall with the new queue calculation mode enabled. 💚 |
|
🎊 +1 overall
This message was automatically generated. |
|
Green with Legacy mode as well. 👍 |
Change-Id: Id1711c95808d4d84b63cd3073203733c819bdcb6
Change-Id: I0d95a3f14bf92a73a6c8fcb1111a6c5670663f07
|
🎊 +1 overall
This message was automatically generated. |
...java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/AbstractLeafQueue.java
Outdated
Show resolved
Hide resolved
...va/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/AbstractParentQueue.java
Show resolved
Hide resolved
...a/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/AutoCreatedLeafQueue.java
Show resolved
Hide resolved
.../org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestApplicationLimits.java
Show resolved
Hide resolved
...a/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestReservationQueue.java
Outdated
Show resolved
Hide resolved
...a/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestReservationQueue.java
Outdated
Show resolved
Hide resolved
...adoop/yarn/server/resourcemanager/scheduler/capacity/AbsoluteResourceCapacityCalculator.java
Outdated
Show resolved
Hide resolved
...adoop/yarn/server/resourcemanager/scheduler/capacity/AbsoluteResourceCapacityCalculator.java
Outdated
Show resolved
Hide resolved
…egacy Change-Id: I084176714fa1de3d67e5cfca2799d899fc5ddb57
Change-Id: I4aca138d1856761af165479063c98c32f6b20753
Change-Id: I9f8b763d1a51d6773db1b68e713ad02559f5fc3e
Change-Id: Iedbb9b891d7dc9ce78b43fdd337b9b922616032b
|
🎊 +1 overall
This message was automatically generated. |
Change-Id: I7f375f86f2ef7a927cc885d5b71ba2291ea075af
|
🎊 +1 overall
This message was automatically generated. |
This reverts commit 02b60d3.
2800 -> 1600 Change-Id: I5790df9a293fc5cfbfa8b4209139ad879d1e07a8
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
...adoop/yarn/server/resourcemanager/scheduler/capacity/AbsoluteResourceCapacityCalculator.java
Show resolved
Hide resolved
...n/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/AbstractCSQueue.java
Show resolved
Hide resolved
...n/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/AbstractCSQueue.java
Outdated
Show resolved
Hide resolved
...n/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/AbstractCSQueue.java
Show resolved
Hide resolved
...n/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/AbstractCSQueue.java
Outdated
Show resolved
Hide resolved
| nm1 = new MockNM("127.0.0.1:1234", 2 * 1024, | ||
| rm.getResourceTrackerService()); | ||
| MockNM nm2 = new MockNM("127.0.0.2:1234", 2 * 1024, | ||
| rm.getResourceTrackerService()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Can fit in previous line.
| .of(NodeId.newInstance("127.0.0.2", 0), Sets.newHashSet(LABEL_LY))); | ||
|
|
||
| MockNM nm3 = new MockNM("127.0.0.2:1234", 128 * 1024, | ||
| rm.getResourceTrackerService()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Can fit in previous line.
|
|
||
| // Default partition | ||
| MockNM nm4 = new MockNM("127.0.0.3:1234", 128 * 1024, | ||
| rm.getResourceTrackerService()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Can fit in previous line.
...g/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebServicesForCSWithPartitions.java
Outdated
Show resolved
Hide resolved
|
|
||
| csConf.setCapacity(ROOT + DOT + B, 90); | ||
| csConf.setMaximumCapacity(ROOT + DOT + B, | ||
| 100); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Can fit in previous line.
szilard-nemeth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some minor comments.
Change-Id: I3dac094e9f1023df4941c7597020554787da4ba9
Change-Id: I9e8eac5f45296cc1fbec88122c6ea9d3d577c154
Change-Id: I231aa662d5a9ce606c9d53a8ca4c55525272e675
Change-Id: Ia6d8390411f632d076f85fe8dd1a3f78448da432
Change-Id: Iaf0036abb67b1242fec2507ac32c2054ee16a27a
Change-Id: I0425f0e2edc04588e787e213ed1d293ccb7fb2de
Change-Id: I984d61e447b4437d22b187147bba4e04b64ba184
Change-Id: I32962351dfe5394bf6bf6f4c0fc2dca9f82bdad6
|
@szilard-nemeth thanks for the review. I added the fixes, there was no big change, so I don't think we need to run the tests 2x times (legacy/non-legacy). |
|
🎊 +1 overall
This message was automatically generated. |
|
@tomicooler , Latest patch LGTM, +1. |
|
Thanks @9uapaw for the original patch, @tomicooler for the updates and test fixes, @K0K0V0K for the help and additional test cases and @szilard-nemeth for the review. Merging this to trunk. |
…Resource (apache#5783) Contributed by: Andras Gyori, Tamas Domok, Bence Kosztolnik and Benjamin Teke --------- Co-authored-by: Benjamin Teke <benjamin.teke@gmail.com>
Description of PR
The new queue resource calculation logic is capable of calculating the queue resources based on mixed resource types. The queues under one parent can also mix their modes (e.g.: root.queue1=percentage root.queue2=weight root.queue3=absolute).
Precedence is: absolute -> percentage -> weight.
Note that the calculation is done by a single resource type at once.
Design doc: YARN-10888
Example
Further examples:
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebServicesCapacitySchedulerMixedMode.javaThe feature is behind a feature flag, it is disabled by default.
Note that the mixed mode is not yet supported for AQCv2 (or v1) templates. YARN-11520
Key changes
The capacity and absoluteCapacity (and maxApplications and other derived properties) of a queue is calculated from the effectiveMinResource (= the current available resource for a given queue based on the queue hierarchy configuration and the available cluster resource).
When there is no cluster resources available yet, the maxApplications are set to the configured values, so applications can be submitted.
Changes in the scheduler-response: the capacity and absoluteCapacity resembles the effective values based on the queue configs and cluster resources. The normalizedWeight is not filled in the scheduler-response when queues are in weight mode.
How was this patch tested?
Acknowledges
The current state of this PR was a team effort, thanks to:
@9uapaw
@brumi1024
@K0K0V0K
Follow up items
For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles?