You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Xiang Li (JIRA)" <ji...@apache.org> on 2019/03/07 16:08:00 UTC

[jira] [Updated] (HBASE-22009) Improve RSGroupInfoManagerImpl#getDefaultServers()

     [ 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)