[
https://issues.apache.org/jira/browse/HBASE-24643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17394304#comment-17394304
]
Clara Xiong commented on HBASE-24643:
-------------------------------------
All five need to be updated for better performance for balancer.
int[][] regionsPerHost; // hostIndex -> list of regions
int[][] regionsPerRack; // rackIndex -> region list
int[][] primariesOfRegionsPerServer; // serverIndex -> sorted list of regions
by primary region
// index
int[][] primariesOfRegionsPerHost; // hostIndex -> sorted list of regions by
primary region index
int[][] primariesOfRegionsPerRack; // rackIndex -> sorted list of regions by
primary region index
> Replace Cluster#primariesOfRegionsPerServer from int array to treemap
> ---------------------------------------------------------------------
>
> Key: HBASE-24643
> URL: https://issues.apache.org/jira/browse/HBASE-24643
> Project: HBase
> Issue Type: Improvement
> Components: Balancer
> Affects Versions: 2.3.0
> Reporter: Huaxiang Sun
> Assignee: Huaxiang Sun
> Priority: Major
>
> Currently, primariesOfRegionsPerServer is an int array, moveRegion does heavy
> work by searching the array (linearly) and insert/remove an element requires
> allocating/copying the whole array.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)