File tree Expand file tree Collapse file tree
hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -525,7 +525,8 @@ private synchronized void refresh(boolean forceOnline) throws IOException {
525525
526526 // This is added to the last of the list so it overwrites the 'default' rsgroup loaded
527527 // from region group table or zk
528- groupList .add (new RSGroupInfo (RSGroupInfo .DEFAULT_GROUP , getDefaultServers (), orphanTables ));
528+ groupList .add (
529+ new RSGroupInfo (RSGroupInfo .DEFAULT_GROUP , getDefaultServers (groupList ), orphanTables ));
529530
530531 // populate the data
531532 HashMap <String , RSGroupInfo > newGroupMap = Maps .newHashMap ();
@@ -684,9 +685,15 @@ private List<ServerName> getOnlineRS() throws IOException {
684685
685686 // Called by ServerEventsListenerThread. Presume it has lock on this manager when it runs.
686687 private SortedSet <Address > getDefaultServers () throws IOException {
688+ return getDefaultServers (listRSGroups ());
689+ }
690+
691+ // Called by ServerEventsListenerThread. Presume it has lock on this manager when it runs.
692+ private SortedSet <Address > getDefaultServers (List <RSGroupInfo > rsGroupInfoList )
693+ throws IOException {
687694 // Build a list of servers in other groups than default group, from rsGroupMap
688695 Set <Address > serversInOtherGroup = new HashSet <>();
689- for (RSGroupInfo group : listRSGroups () /* get from rsGroupMap */ ) {
696+ for (RSGroupInfo group : rsGroupInfoList ) {
690697 if (!RSGroupInfo .DEFAULT_GROUP .equals (group .getName ())) { // not default group
691698 serversInOtherGroup .addAll (group .getServers ());
692699 }
You can’t perform that action at this time.
0 commit comments