You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by jg...@apache.org on 2010/10/20 19:25:11 UTC

svn commit: r1025647 - in /hbase/trunk: CHANGES.txt src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java

Author: jgray
Date: Wed Oct 20 17:25:11 2010
New Revision: 1025647

URL: http://svn.apache.org/viewvc?rev=1025647&view=rev
Log:
HBASE-3133 Only log compaction requests when a request is actually added to the queue

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1025647&r1=1025646&r2=1025647&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Wed Oct 20 17:25:11 2010
@@ -1019,6 +1019,8 @@ Release 0.21.0 - Unreleased
    HBASE-3076  Allow to disable automatic shipping of dependency jars
                for mapreduce jobs (Bruno Dumon)
    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
    HBASE-1961  HBase EC2 scripts

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java?rev=1025647&r1=1025646&r2=1025647&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java Wed Oct 20 17:25:11 2010
@@ -159,13 +159,12 @@ public class CompactSplitThread extends 
       return;
     }
     r.setForceMajorCompaction(force);
-    if (LOG.isDebugEnabled()) {
+    if (compactionQueue.add(r, priority) && LOG.isDebugEnabled()) {
       LOG.debug("Compaction " + (force? "(major) ": "") +
         "requested for region " + r.getRegionNameAsString() +
         (why != null && !why.isEmpty()? " because: " + why: "") +
         "; Priority: " + priority + "; Compaction queue size: " + compactionQueue.size());
     }
-    compactionQueue.add(r, priority);
   }
 
   private void split(final HRegion parent, final byte [] midKey)