[ 
https://issues.apache.org/jira/browse/HBASE-19021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16211787#comment-16211787
 ] 

Jerry He commented on HBASE-19021:
----------------------------------

Hi, [~stack] 
bq.  bytable is not implemented in AMv2 IIRC
It is implemented RegionStates,  but just missing a call to it. 
 {code}
   * @param forceByCluster a flag to force to aggregate the server-load to the 
cluster level
   * @return A clone of current assignments by table.
   */
  public Map<TableName, Map<ServerName, List<RegionInfo>>> 
getAssignmentsByTable(
      final boolean forceByCluster) {
    if (!forceByCluster) return getAssignmentsByTable();
{code}

bq. You saying when you add a Server, it doesn't get Regions? (I don't recall 
this in testing but perhaps so).
Yes.  From looking at the code, and some testing.  Tested it again today.
{noformat}
ServerName                      Start time      Last contact    Version 
Requests Per Second     Num. Regions
throb1,16020,1508446443086      Thu Oct 19 13:54:03 PDT 2017    2 s     
3.0.0-SNAPSHOT  0       0
throb1,45403,1508440236028      Thu Oct 19 12:10:36 PDT 2017    0 s     
3.0.0-SNAPSHOT  0       6
Total:2                         0       6
{noformat}
bq. You are fixing this over in another issue?
The draining issue is dealt with in this patch too.

> Restore a few important missing logics for balancer in 2.0
> ----------------------------------------------------------
>
>                 Key: HBASE-19021
>                 URL: https://issues.apache.org/jira/browse/HBASE-19021
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Jerry He
>            Assignee: Jerry He
>            Priority: Critical
>         Attachments: HBASE-19021-master.patch
>
>
> After looking at the code, and some testing, I see the following things are 
> missing for balancer to work properly after AMv2.
> # hbase.master.loadbalance.bytable is not respected. It is always 'bytable'. 
> Previous default is cluster wide, not by table.
> # Servers with no assignments is not added for balance consideration.
> # Crashed server is not removed from the in-memory server map in 
> RegionStates, which affects balance.
> # Draining marker is not respected when balance.
> Also try to re-enable {{TestRegionRebalancing}}, which has a 
> {{testRebalanceOnRegionServerNumberChange}}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to