From 66da601cdcc915c3ccebd994105c8f7fbebf556d Mon Sep 17 00:00:00 2001 From: stack Date: Thu, 4 Feb 2016 14:24:05 -0800 Subject: [PATCH] HBASE-15120 Undo aggressive load balancer logging at tens of lines per millisecond --- .../hadoop/hbase/master/balancer/BaseLoadBalancer.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java index 3728c9ae6f9..97494f01a99 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java @@ -814,9 +814,11 @@ public abstract class BaseLoadBalancer implements LoadBalancer { i++; lowestLocalityServerIndex = serverIndicesSortedByLocality[i]; } - LOG.debug("Lowest locality region server with non zero regions is " + if (LOG.isTraceEnabled()) { + LOG.trace("Lowest locality region server with non zero regions is " + servers[lowestLocalityServerIndex].getHostname() + " with locality " + localityPerServer[lowestLocalityServerIndex]); + } return lowestLocalityServerIndex; } } @@ -839,9 +841,11 @@ public abstract class BaseLoadBalancer implements LoadBalancer { lowestLocalityRegionIndex = j; } } - LOG.debug(" Lowest locality region index is " + lowestLocalityRegionIndex + if (LOG.isTraceEnabled()) { + LOG.debug(" Lowest locality region index is " + lowestLocalityRegionIndex + " and its region server contains " + regionsPerServer[serverIndex].length + " regions"); + } return regionsPerServer[serverIndex][lowestLocalityRegionIndex]; } else { return -1;