From e927fe88fb5f705c531e66c9cf58fc47856db405 Mon Sep 17 00:00:00 2001 From: Baiqiang Zhao Date: Mon, 30 Nov 2020 11:40:51 +0800 Subject: [PATCH] HBASE-25330 RSGroupInfoManagerImpl#moveServers return is not set of servers moved (#2719) Signed-off-by: Duo Zhang --- .../apache/hadoop/hbase/rsgroup/RSGroupInfoManagerImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfoManagerImpl.java b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfoManagerImpl.java index 53c74914761..96ec19fc146 100644 --- a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfoManagerImpl.java +++ b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfoManagerImpl.java @@ -244,6 +244,7 @@ final class RSGroupInfoManagerImpl implements RSGroupInfoManager { String dstGroup) throws IOException { RSGroupInfo src = getRSGroupInfo(srcGroup); RSGroupInfo dst = getRSGroupInfo(dstGroup); + Set
movedServers = new HashSet<>(); // If destination is 'default' rsgroup, only add servers that are online. If not online, drop // it. If not 'default' group, add server to 'dst' rsgroup EVEN IF IT IS NOT online (could be a // rsgroup of dead servers that are to come back later). @@ -261,12 +262,13 @@ final class RSGroupInfoManagerImpl implements RSGroupInfoManager { } } dst.addServer(el); + movedServers.add(el); } Map newGroupMap = Maps.newHashMap(rsGroupMap); newGroupMap.put(src.getName(), src); newGroupMap.put(dst.getName(), dst); flushConfig(newGroupMap); - return dst.getServers(); + return movedServers; } @Override