HBASE-26185 Return mutable list in AssignmentManager#getExcludedServersForSystemTable (#3577)

Signed-off-by: Viraj Jasani <vjasani@apache.org>
This commit is contained in:
Rushabh Shah 2021-08-12 04:16:22 -04:00 committed by Viraj Jasani
parent 243e861985
commit 6b9114d95e
No known key found for this signature in database
GPG Key ID: 08E70F70AB71C5A1

View File

@ -2309,7 +2309,7 @@ public class AssignmentManager {
.map(s->new Pair<>(s, master.getRegionServerVersion(s)))
.collect(Collectors.toList());
if (serverList.isEmpty()) {
return Collections.emptyList();
return new ArrayList<>();
}
String highestVersion = Collections.max(serverList,
(o1, o2) -> VersionInfo.compareVersion(o1.getSecond(), o2.getSecond())).getSecond();
@ -2317,7 +2317,7 @@ public class AssignmentManager {
int comparedValue = VersionInfo.compareVersion(minVersionToMoveSysTables,
highestVersion);
if (comparedValue > 0) {
return Collections.emptyList();
return new ArrayList<>();
}
}
return serverList.stream()