HBASE-3133 Only log compaction requests when a request is actually added to the queue

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1025647 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jonathan Gray 2010-10-20 17:25:11 +00:00
parent 6d2aaf8833
commit 90420894be
2 changed files with 3 additions and 2 deletions

View File

@ -1019,6 +1019,8 @@ Release 0.21.0 - Unreleased
HBASE-3076 Allow to disable automatic shipping of dependency jars HBASE-3076 Allow to disable automatic shipping of dependency jars
for mapreduce jobs (Bruno Dumon) for mapreduce jobs (Bruno Dumon)
HBASE-3128 On assign, if ConnectException, reassign another server HBASE-3128 On assign, if ConnectException, reassign another server
HBASE-3133 Only log compaction requests when a request is actually added
to the queue
NEW FEATURES NEW FEATURES
HBASE-1961 HBase EC2 scripts HBASE-1961 HBase EC2 scripts

View File

@ -159,13 +159,12 @@ public class CompactSplitThread extends Thread implements CompactionRequestor {
return; return;
} }
r.setForceMajorCompaction(force); r.setForceMajorCompaction(force);
if (LOG.isDebugEnabled()) { if (compactionQueue.add(r, priority) && LOG.isDebugEnabled()) {
LOG.debug("Compaction " + (force? "(major) ": "") + LOG.debug("Compaction " + (force? "(major) ": "") +
"requested for region " + r.getRegionNameAsString() + "requested for region " + r.getRegionNameAsString() +
(why != null && !why.isEmpty()? " because: " + why: "") + (why != null && !why.isEmpty()? " because: " + why: "") +
"; Priority: " + priority + "; Compaction queue size: " + compactionQueue.size()); "; Priority: " + priority + "; Compaction queue size: " + compactionQueue.size());
} }
compactionQueue.add(r, priority);
} }
private void split(final HRegion parent, final byte [] midKey) private void split(final HRegion parent, final byte [] midKey)