[
https://issues.apache.org/jira/browse/HBASE-20186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16416662#comment-16416662
]
Hudson commented on HBASE-20186:
--------------------------------
Results for branch HBASE-19064
[build #77 on
builds.a.o|https://builds.apache.org/job/HBase%20Nightly/job/HBASE-19064/77/]:
(x) *{color:red}-1 overall{color}*
----
details (if available):
(x) {color:red}-1 general checks{color}
-- For more information [see general
report|https://builds.apache.org/job/HBase%20Nightly/job/HBASE-19064/77//General_Nightly_Build_Report/]
(x) {color:red}-1 jdk8 hadoop2 checks{color}
-- For more information [see jdk8 (hadoop2)
report|https://builds.apache.org/job/HBase%20Nightly/job/HBASE-19064/77//JDK8_Nightly_Build_Report_(Hadoop2)/]
(x) {color:red}-1 jdk8 hadoop3 checks{color}
-- For more information [see jdk8 (hadoop3)
report|https://builds.apache.org/job/HBase%20Nightly/job/HBASE-19064/77//JDK8_Nightly_Build_Report_(Hadoop3)/]
(/) {color:green}+1 source release artifact{color}
-- See build output for details.
> Improve RSGroupBasedLoadBalancer#balanceCluster() to be more efficient when
> calculating cluster state for each rsgroup
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: HBASE-20186
> URL: https://issues.apache.org/jira/browse/HBASE-20186
> Project: HBase
> Issue Type: Improvement
> Components: rsgroup
> Reporter: Xiang Li
> Assignee: Xiang Li
> Priority: Minor
> Fix For: 3.0.0, 2.1.0, 1.5.0, 1.4.3
>
> Attachments: HBASE-20186.master.000.patch,
> HBASE-20186.master.001.patch
>
>
> In RSGroupBasedLoadBalancer
> {code}
> public List<RegionPlan> balanceCluster(Map<ServerName, List<RegionInfo>>
> clusterState)
> {code}
> The second half of the function is to calculate region move plan for regions
> which have been already placed according to the rsgroup assignment, and it is
> calculated one rsgroup after another.
> The following logic to check if a server belongs to the rsgroup is not quite
> efficient, as it does not make good use of the fact that servers in
> RSGroupInfo is a TreeSet.
> {code}
> for (Address sName : info.getServers()) {
> for(ServerName curr: clusterState.keySet()) {
> if(curr.getAddress().equals(sName)) {
> groupClusterState.put(curr, correctedState.get(curr));
> }
> }
> }
> {code}
> Given there are m region servers in the cluster and n region servers for each
> rsgroup in average, the code above has time complexity as O(m * n), while
> using TreeSet's contains(), the time complexity could be reduced to O (m *
> logn).
> Another improvement is we do not need to scan every server for each rsgroup.
> If the processed server could be recorded, we could skip those.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)