Browse Source

YARN-11482. Fix bug of DRF comparision DominantResourceFairnessComparator2 in fair scheduler. (#5607). Contributed by Xiaoqiao He.

Reviewed-by: Shilun Fan <slfan1989@apache.org>
(cherry picked from commit 70c0aa342e6a6a12b647bbfe30bb73313958e450)
Hexiaoqiao 2 years ago
parent
commit
f6850b89f3

+ 1 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/policies/DominantResourceFairnessPolicy.java

@@ -390,7 +390,7 @@ public class DominantResourceFairnessPolicy extends SchedulingPolicy {
       // share for that resource
       // share for that resource
       boolean s1Needy = resourceInfo1[dominant1].getValue() <
       boolean s1Needy = resourceInfo1[dominant1].getValue() <
           minShareInfo1[dominant1].getValue();
           minShareInfo1[dominant1].getValue();
-      boolean s2Needy = resourceInfo1[dominant2].getValue() <
+      boolean s2Needy = resourceInfo2[dominant2].getValue() <
           minShareInfo2[dominant2].getValue();
           minShareInfo2[dominant2].getValue();
 
 
       int res;
       int res;