hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r685031 - in /hadoop/hbase/branches/0.2: CHANGES.txt src/java/org/apache/hadoop/hbase/regionserver/HStore.java
Date Tue, 12 Aug 2008 04:21:24 GMT
Author: stack
Date: Mon Aug 11 21:21:21 2008
New Revision: 685031

URL: http://svn.apache.org/viewvc?rev=685031&view=rev
Log:
HBASE-812 Compaction needs little better skip algo

Modified:
    hadoop/hbase/branches/0.2/CHANGES.txt
    hadoop/hbase/branches/0.2/src/java/org/apache/hadoop/hbase/regionserver/HStore.java

Modified: hadoop/hbase/branches/0.2/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.2/CHANGES.txt?rev=685031&r1=685030&r2=685031&view=diff
==============================================================================
--- hadoop/hbase/branches/0.2/CHANGES.txt (original)
+++ hadoop/hbase/branches/0.2/CHANGES.txt Mon Aug 11 21:21:21 2008
@@ -16,6 +16,7 @@
    HBASE-801  When a table haven't disable, shell could response in a "user
               friendly" way.
    HBASE-816  TableMap should survive USE (Andrew Purtell via Stack)
+   HBASE-812  Compaction needs little better skip algo (Daniel Leffel via Stack)
 
   NEW FEATURES
   OPTIMIZATIONS

Modified: hadoop/hbase/branches/0.2/src/java/org/apache/hadoop/hbase/regionserver/HStore.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.2/src/java/org/apache/hadoop/hbase/regionserver/HStore.java?rev=685031&r1=685030&r2=685031&view=diff
==============================================================================
--- hadoop/hbase/branches/0.2/src/java/org/apache/hadoop/hbase/regionserver/HStore.java (original)
+++ hadoop/hbase/branches/0.2/src/java/org/apache/hadoop/hbase/regionserver/HStore.java Mon
Aug 11 21:21:21 2008
@@ -784,10 +784,19 @@
         }
         filesToCompact = new ArrayList<HStoreFile>(filesToCompact.subList(point,
           countOfFiles));
+        if (filesToCompact.size() <= 1) {
+          if (LOG.isDebugEnabled()) {
+            LOG.debug("Skipped compaction of 1 file; compaction size of " +
+              this.storeNameStr + ": " +
+              StringUtils.humanReadableInt(totalSize) + "; Skipped " + point +
+              " files, size: " + skipped);
+          }
+          return checkSplit();
+        }
         if (LOG.isDebugEnabled()) {
           LOG.debug("Compaction size of " + this.storeNameStr + ": " +
-            StringUtils.humanReadableInt(totalSize) + ", skipped " + point +
-            ", " + skipped);
+            StringUtils.humanReadableInt(totalSize) + "; Skipped " + point +
+            " files , size: " + skipped);
         }
       }
 



Mime
View raw message