From 6b9114d95ee1fea130f63fbcb1c08db5979c6404 Mon Sep 17 00:00:00 2001 From: Rushabh Shah Date: Thu, 12 Aug 2021 04:16:22 -0400 Subject: [PATCH] HBASE-26185 Return mutable list in AssignmentManager#getExcludedServersForSystemTable (#3577) Signed-off-by: Viraj Jasani --- .../hadoop/hbase/master/assignment/AssignmentManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java index 9b49d2a95f0d..9c1f2e62bfc0 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java @@ -2309,7 +2309,7 @@ public List 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(); @@ -2317,7 +2317,7 @@ public List getExcludedServersForSystemTable() { int comparedValue = VersionInfo.compareVersion(minVersionToMoveSysTables, highestVersion); if (comparedValue > 0) { - return Collections.emptyList(); + return new ArrayList<>(); } } return serverList.stream()