Skip to content

Commit

Permalink
HBASE-26185 Return mutable list in AssignmentManager#getExcludedServe…
Browse files Browse the repository at this point in the history
…rsForSystemTable (#3577)

Signed-off-by: Viraj Jasani <vjasani@apache.org>
  • Loading branch information
shahrs87 authored and virajjasani committed Aug 12, 2021
1 parent 2f6152f commit 3ee40e0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2281,15 +2281,15 @@ public List<ServerName> getExcludedServersForSystemTable() {
.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();
if (!DEFAULT_MIN_VERSION_MOVE_SYS_TABLES_CONFIG.equals(minVersionToMoveSysTables)) {
int comparedValue = VersionInfo.compareVersion(minVersionToMoveSysTables,
highestVersion);
if (comparedValue > 0) {
return Collections.emptyList();
return new ArrayList<>();
}
}
return serverList.stream()
Expand Down

0 comments on commit 3ee40e0

Please sign in to comment.