This is an automated email from the ASF dual-hosted git repository.

liyu pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
     new a591c60  HBASE-21777 Only log compaction pressure throughput when 
changed or traced
a591c60 is described below

commit a591c60368912b8c595bed4bfcac48fcc983cb70
Author: Tak Lon (Stephen) Wu <[email protected]>
AuthorDate: Tue May 7 11:28:08 2019 -0700

    HBASE-21777 Only log compaction pressure throughput when changed or traced
    
    Signed-off-by: Yu Li <[email protected]>
    Signed-off-by: Andrew Purtell <[email protected]>
---
 .../PressureAwareCompactionThroughputController.java        | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/throttle/PressureAwareCompactionThroughputController.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/throttle/PressureAwareCompactionThroughputController.java
index b3c7bf3..63aa646 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/throttle/PressureAwareCompactionThroughputController.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/throttle/PressureAwareCompactionThroughputController.java
@@ -99,11 +99,14 @@ public class PressureAwareCompactionThroughputController 
extends PressureAwareTh
           maxThroughputLowerBound + (maxThroughputUpperBound - 
maxThroughputLowerBound)
               * compactionPressure;
     }
-    if (LOG.isTraceEnabled()) {
-      // TODO: FIX!!! Don't log unless some activity or a change in config. 
Making TRACE
-      // in the meantime.
-      LOG.trace("CompactionPressure is " + compactionPressure + ", tune 
throughput to "
-          + throughputDesc(maxThroughputToSet));
+    if (LOG.isDebugEnabled()) {
+      if (maxThroughputToSet != getMaxThroughput()) {
+        LOG.debug("CompactionPressure is " + compactionPressure + ", tune 
throughput to "
+            + throughputDesc(maxThroughputToSet));
+      } else if (LOG.isTraceEnabled()) {
+        LOG.trace("CompactionPressure is " + compactionPressure + ", keep 
throughput throttling to "
+            + throughputDesc(maxThroughputToSet));
+      }
     }
     this.setMaxThroughput(maxThroughputToSet);
   }

Reply via email to