[ 
https://issues.apache.org/jira/browse/HBASE-22009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xiang Li updated HBASE-22009:
-----------------------------
    Description: 
{code}
  private SortedSet<Address> getDefaultServers() throws IOException {
    SortedSet<Address> defaultServers = Sets.newTreeSet();
    for (ServerName serverName : getOnlineRS()) {
      Address server = Address.fromParts(serverName.getHostname(), 
serverName.getPort());
      boolean found = false;
      for (RSGroupInfo rsgi : listRSGroups()) {
        if (!RSGroupInfo.DEFAULT_GROUP.equals(rsgi.getName()) && 
rsgi.containsServer(server)) {
          found = true;
          break;
        }
      }
      if (!found) {
        defaultServers.add(server);
      }
    }
    return defaultServers;
  }
{code}

> Improve RSGroupInfoManagerImpl#getDefaultServers()
> --------------------------------------------------
>
>                 Key: HBASE-22009
>                 URL: https://issues.apache.org/jira/browse/HBASE-22009
>             Project: HBase
>          Issue Type: Improvement
>          Components: rsgroup
>            Reporter: Xiang Li
>            Assignee: Xiang Li
>            Priority: Minor
>
> {code}
>   private SortedSet<Address> getDefaultServers() throws IOException {
>     SortedSet<Address> defaultServers = Sets.newTreeSet();
>     for (ServerName serverName : getOnlineRS()) {
>       Address server = Address.fromParts(serverName.getHostname(), 
> serverName.getPort());
>       boolean found = false;
>       for (RSGroupInfo rsgi : listRSGroups()) {
>         if (!RSGroupInfo.DEFAULT_GROUP.equals(rsgi.getName()) && 
> rsgi.containsServer(server)) {
>           found = true;
>           break;
>         }
>       }
>       if (!found) {
>         defaultServers.add(server);
>       }
>     }
>     return defaultServers;
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to