clarax commented on a change in pull request #3356:
URL: https://github.com/apache/hbase/pull/3356#discussion_r668099448
##########
File path:
hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java
##########
@@ -303,54 +303,55 @@ private String getBalanceReason(double total, double
sumMultiplier) {
boolean needsBalance(TableName tableName, BalancerClusterState cluster) {
ClusterLoadState cs = new ClusterLoadState(cluster.clusterState);
if (cs.getNumServers() < MIN_SERVER_BALANCE) {
- if (LOG.isDebugEnabled()) {
- LOG.debug("Not running balancer because only " + cs.getNumServers()
+ LOG.info("Not running balancer because only " + cs.getNumServers()
+ " active regionserver(s)");
- }
sendRejectionReasonToRingBuffer(() -> "The number of RegionServers " +
cs.getNumServers() +
" < MIN_SERVER_BALANCE(" + MIN_SERVER_BALANCE + ")", null);
return false;
}
if (areSomeRegionReplicasColocated(cluster)) {
+ LOG.info("Running balancer because at least one server hosts replicas of
the same region.");
return true;
}
if (idleRegionServerExist(cluster)){
+ LOG.info("Running balancer because cluster has idle server(s).");
Review comment:
yes.
##########
File path:
hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java
##########
@@ -423,8 +424,9 @@ private long calculateMaxSteps(BalancerClusterState
cluster) {
maxSteps);
}
}
- LOG.info("start StochasticLoadBalancer.balancer, initCost=" + currentCost
+ ", functionCost="
- + functionCost() + " computedMaxSteps: " + computedMaxSteps);
+ LOG.info("Start StochasticLoadBalancer.balancer, initial weighted average
imbalance={}, "
Review comment:
the functionCost has a ";" at the end so I removed the ",". The function
cost explain the values. Here is the sample log from runs again which I posted
above: functionCost=RegionCountSkewCostFunction : (multiplier=500.0,
imbalance=0.0, balanced); PrimaryRegionCountSkewCostFunction : (not needed);
MoveCostFunction : (multiplier=7.0, imbalance=0.0, balanced);
RackLocalityCostFunction : (multiplier=15.0, imbalance=0.0, balanced);
TableSkewCostFunction : (multiplier=35.0, imbalance=1.0);
RegionReplicaHostCostFunction : (not needed); RegionReplicaRackCostFunction :
(not needed); ReadRequestCostFunction : (multiplier=5.0, imbalance=0.0,
balanced); CPRequestCostFunction : (multiplier=5.0, imbalance=0.0, balanced);
WriteRequestCostFunction : (multiplier=5.0, imbalance=0.0, balanced);
MemStoreSizeCostFunction : (multiplier=5.0, imbalance=0.0, balanced);
StoreFileCostFunction : (multiplier=5.0, imbalance=0.0, balanced);
--
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]