HBASE-25330 RSGroupInfoManagerImpl#moveServers return is not set of servers moved (#2708)
Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
parent
679dd7b8f9
commit
e2c1b10cb7
|
@ -320,6 +320,7 @@ final class RSGroupInfoManagerImpl implements RSGroupInfoManager {
|
||||||
String dstGroup) throws IOException {
|
String dstGroup) throws IOException {
|
||||||
RSGroupInfo src = getRSGroupInfo(srcGroup);
|
RSGroupInfo src = getRSGroupInfo(srcGroup);
|
||||||
RSGroupInfo dst = getRSGroupInfo(dstGroup);
|
RSGroupInfo dst = getRSGroupInfo(dstGroup);
|
||||||
|
Set<Address> movedServers = new HashSet<>();
|
||||||
// If destination is 'default' rsgroup, only add servers that are online. If not online, drop
|
// 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
|
// 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).
|
// rsgroup of dead servers that are to come back later).
|
||||||
|
@ -336,12 +337,13 @@ final class RSGroupInfoManagerImpl implements RSGroupInfoManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dst.addServer(el);
|
dst.addServer(el);
|
||||||
|
movedServers.add(el);
|
||||||
}
|
}
|
||||||
Map<String, RSGroupInfo> newGroupMap = Maps.newHashMap(holder.groupName2Group);
|
Map<String, RSGroupInfo> newGroupMap = Maps.newHashMap(holder.groupName2Group);
|
||||||
newGroupMap.put(src.getName(), src);
|
newGroupMap.put(src.getName(), src);
|
||||||
newGroupMap.put(dst.getName(), dst);
|
newGroupMap.put(dst.getName(), dst);
|
||||||
flushConfig(newGroupMap);
|
flushConfig(newGroupMap);
|
||||||
return dst.getServers();
|
return movedServers;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue