[
https://issues.apache.org/jira/browse/HBASE-17194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15713329#comment-15713329
]
Ted Yu commented on HBASE-17194:
--------------------------------
{code}
+ if (load != null && idleServerPredicator != null) {
{code}
The null check for idleServerPredicator can be lifted out of the loop.
{code}
+ static final Predicate<ServerLoad> SERVER_PREDICATOR
+ = load -> load.getNumberOfRegions() == 0;
{code}
Name the variable EMPTY_SERVER_PREDICATOR (SERVER_PREDICATOR is too general).
Since arbitrary predicate can be passed to
getOnlineServersListWithIdlePredicator(), name it
getOnlineServersListWithPredicator().
Looks good overall.
> Assign the new region to the idle server after splitting
> --------------------------------------------------------
>
> Key: HBASE-17194
> URL: https://issues.apache.org/jira/browse/HBASE-17194
> Project: HBase
> Issue Type: Improvement
> Affects Versions: 2.0.0
> Reporter: ChiaPing Tsai
> Assignee: ChiaPing Tsai
> Priority: Minor
> Fix For: 2.0.0
>
> Attachments: HBASE-17194.v0.patch, HBASE-17194.v1.patch,
> HBASE-17194.v2.patch, HBASE-17194.v3.patch, evaluation-v0.png, tests.xlsx
>
>
> The new regions are assigned to the random servers after splitting, but there
> always are some idle servers which don’t be assigned any regions on the new
> cluster. It is a bad start of load balance, hence we should give priority to
> the idle servers for assignment.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)