HBASE-26185 Return mutable list in AssignmentManager#getExcludedServersForSystemTable (#3577)
Signed-off-by: Viraj Jasani <vjasani@apache.org>
This commit is contained in:
parent
5e8a269b1a
commit
d307a8f2e8
|
@ -2322,7 +2322,7 @@ public class AssignmentManager {
|
||||||
.map(s->new Pair<>(s, master.getRegionServerVersion(s)))
|
.map(s->new Pair<>(s, master.getRegionServerVersion(s)))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
if (serverList.isEmpty()) {
|
if (serverList.isEmpty()) {
|
||||||
return Collections.emptyList();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
String highestVersion = Collections.max(serverList,
|
String highestVersion = Collections.max(serverList,
|
||||||
(o1, o2) -> VersionInfo.compareVersion(o1.getSecond(), o2.getSecond())).getSecond();
|
(o1, o2) -> VersionInfo.compareVersion(o1.getSecond(), o2.getSecond())).getSecond();
|
||||||
|
@ -2330,7 +2330,7 @@ public class AssignmentManager {
|
||||||
int comparedValue = VersionInfo.compareVersion(minVersionToMoveSysTables,
|
int comparedValue = VersionInfo.compareVersion(minVersionToMoveSysTables,
|
||||||
highestVersion);
|
highestVersion);
|
||||||
if (comparedValue > 0) {
|
if (comparedValue > 0) {
|
||||||
return Collections.emptyList();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return serverList.stream()
|
return serverList.stream()
|
||||||
|
|
Loading…
Reference in New Issue