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

Ted Yu commented on HBASE-19021:
--------------------------------

{code}
1421            
this.assignmentManager.getRegionStates().getAssignmentsByTable(!isByTable);
{code}
Why the negation ?
{code}
+    for (Map<ServerName, List<RegionInfo>> table: result.values()) {
{code}
table is a Map. Consider renaming the variable for better readability.
{code}
+      if (this.balancerName.contains("StochasticLoadBalancer")) {
+ avgLoadPlusSlop++;
+ avgLoadMinusSlop--;
{code}
Indentation is off.
{code}
+    try {
+        Thread.sleep(200);
+      } catch (InterruptedException e) {}
{code}
Please handle InterruptedException properly.



> 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