HDFS-17566. Got wrong sorted block order when StorageType is considered. (#6934). Contributed by Chenyu Zheng.
Signed-off-by: He Xiaoqiao <hexiaoqiao@apache.org>
This commit is contained in:
parent
f211af30be
commit
8913d379fd
@ -684,7 +684,7 @@ private Consumer<List<DatanodeInfoWithStorage>> createSecondaryNodeSorter() {
|
|||||||
} else if (s2 == null) {
|
} else if (s2 == null) {
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
return s2.compareTo(s1);
|
return s1.compareTo(s2);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
secondarySort = list -> Collections.sort(list, comp);
|
secondarySort = list -> Collections.sort(list, comp);
|
||||||
|
Loading…
Reference in New Issue
Block a user