You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Xiang Li (JIRA)" <ji...@apache.org> on 2018/02/02 00:42:00 UTC

[jira] [Created] (HBASE-19917) Improve RSGroupBasedLoadBalancer#filterServers() to be more efficient

Xiang Li created HBASE-19917:
--------------------------------

             Summary: Improve RSGroupBasedLoadBalancer#filterServers() to be more efficient
                 Key: HBASE-19917
                 URL: https://issues.apache.org/jira/browse/HBASE-19917
             Project: HBase
          Issue Type: Improvement
          Components: rsgroup
            Reporter: Xiang Li
            Assignee: Xiang Li


private List<ServerName> filterServers(Collection<Address> servers,
    Collection<ServerName> onlineServers) {
  ArrayList<ServerName> finalList = new ArrayList<ServerName>();
  for (Address server : servers) {
    for(ServerName curr: onlineServers) {
      if(curr.getAddress().equals(server)) {
        finalList.add(curr);
      }
    }
  }
  return finalList;
}



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