Skip to content

Commit b5b89f7

Browse files
Tak Lon (Stephen) Wucarp84
authored andcommitted
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]>
1 parent 2005122 commit b5b89f7

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/throttle/PressureAwareCompactionThroughputController.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,14 @@ private void tune(double compactionPressure) {
9999
maxThroughputLowerBound + (maxThroughputUpperBound - maxThroughputLowerBound)
100100
* compactionPressure;
101101
}
102-
if (LOG.isTraceEnabled()) {
103-
// TODO: FIX!!! Don't log unless some activity or a change in config. Making TRACE
104-
// in the meantime.
105-
LOG.trace("CompactionPressure is " + compactionPressure + ", tune throughput to "
106-
+ throughputDesc(maxThroughputToSet));
102+
if (LOG.isDebugEnabled()) {
103+
if (maxThroughputToSet != getMaxThroughput()) {
104+
LOG.debug("CompactionPressure is " + compactionPressure + ", tune throughput to "
105+
+ throughputDesc(maxThroughputToSet));
106+
} else if (LOG.isTraceEnabled()) {
107+
LOG.trace("CompactionPressure is " + compactionPressure + ", keep throughput throttling to "
108+
+ throughputDesc(maxThroughputToSet));
109+
}
107110
}
108111
this.setMaxThroughput(maxThroughputToSet);
109112
}

0 commit comments

Comments
 (0)