anoopsjohn commented on a change in pull request #1511: HBASE-24139 : Balancer 
should avoid leaving idle region servers
URL: https://github.com/apache/hbase/pull/1511#discussion_r408617013
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java
 ##########
 @@ -310,6 +310,19 @@ protected synchronized boolean 
areSomeRegionReplicasColocated(Cluster c) {
     return false;
   }
 
+  private synchronized boolean areThereIdleRegions(Cluster c){
+    boolean isServerExistsWithMoreRegions=false;
+    boolean isServerExistsWithZeroRegions=false;
+    for (ServerName server:c.servers){
 
 Review comment:
   This is iterating over many data structures and complex. Why cant we just 
iterate over the regionsPerServer data structure alone and populate the 
booleans as needed?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to