HBASE-21777 Only log compaction pressure throughput when changed or traced

Signed-off-by: Yu Li <liyu@apache.org>
Signed-off-by: Andrew Purtell <apurtell@apache.org>
This commit is contained in:
Tak Lon (Stephen) Wu 2019-05-07 11:28:08 -07:00 committed by Yu Li
parent 2005122363
commit b5b89f7c74
1 changed files with 8 additions and 5 deletions

View File

@ -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);
}