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 70c0aa342e)
This commit is contained in:
Hexiaoqiao 2023-04-29 11:18:42 +08:00 committed by He Xiaoqiao
parent 4670f9e8b0
commit f6850b89f3
No known key found for this signature in database
GPG Key ID: A80CC124E9A0FA63

View File

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