hingu-8103 commented on code in PR #7900:
URL: https://github.com/apache/hbase/pull/7900#discussion_r2916172007
##########
hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/CacheAwareLoadBalancer.java:
##########
@@ -173,6 +173,11 @@ private RegionInfo
getRegionInfoByEncodedName(BalancerClusterState cluster, Stri
@Override
public void throttle(RegionPlan plan) {
+ throttle(plan, this);
+ }
+
+ @Override
+ public void throttle(RegionPlan plan, Object syncMonitor) {
Review Comment:
Hi @vaijosh, i've addressed your comments.
I have added new method called getThrottleTime in CacheAwareLoadBalancer
which returns 0L if throttle is not needed else throttle time. Now,
RSGroupBasedLoadBalancer first fetches throttle time by this method and then
calls this.wait(throttleTime) accordingly. This way we have sync logic in one
place.
Thanks.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]