Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ private synchronized void refresh(boolean forceOnline) throws IOException {
// so it overwrites the default group loaded
// from region group table or zk
groupList.add(new RSGroupInfo(RSGroupInfo.DEFAULT_GROUP,
Sets.newHashSet(getDefaultServers()),
Sets.newHashSet(getDefaultServers(groupList)),
orphanTables));

// populate the data
Expand Down Expand Up @@ -479,9 +479,13 @@ private List<ServerName> getOnlineRS() throws IOException {
}

private List<Address> getDefaultServers() throws IOException {
return getDefaultServers(listRSGroups() /* get from rsGroupMap */);
}

private List<Address> getDefaultServers(List<RSGroupInfo> rsGroupInfoList) throws IOException {
// Build a list of servers in other groups than default group, from rsGroupMap
Set<Address> serverAddressesInOtherGroups = new HashSet<>();
for (RSGroupInfo group : listRSGroups() /* get from rsGroupMap */) {
for (RSGroupInfo group : rsGroupInfoList) {
if (!RSGroupInfo.DEFAULT_GROUP.equals(group.getName())) { // not default group
serverAddressesInOtherGroups.addAll(group.getServers());
}
Expand Down