hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nspiegelb...@apache.org
Subject svn commit: r1181502 - /hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
Date Tue, 11 Oct 2011 02:14:18 GMT
Author: nspiegelberg
Date: Tue Oct 11 02:14:17 2011
New Revision: 1181502

URL: http://svn.apache.org/viewvc?rev=1181502&view=rev
Log:
Bulk import compaction exclude

Summary:
Add option to exclude bulk import files from minor compactions.  This
will prevent major compaction storms from occuring during incremental
scrapes.

Test Plan:
- mvn clean install -DskipTests

Reviewed By: kannan
Reviewers: kannan
CC: kannan
Tasks:

Revert Plan:
OK

Differential Revision: 224573

Modified:
    hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java

Modified: hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java?rev=1181502&r1=1181501&r2=1181502&view=diff
==============================================================================
--- hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java (original)
+++ hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java Tue
Oct 11 02:14:17 2011
@@ -869,6 +869,17 @@ public class Store implements HeapSize {
       int start = 0;
       double r = this.compactRatio;
 
+      // exclude bulk import files from minor compactions, if configured
+      if (conf.getBoolean("hbase.hstore.compaction.include.bulk", false)) {
+        filesToCompact.removeAll(Collections2.filter(filesToCompact,
+            new Predicate<StoreFile>() {
+              @Override
+              public boolean apply(StoreFile input) {
+                return input.isBulkLoadResult();
+              }
+            }));
+      }
+
       /* TODO: add sorting + unit test back in when HBASE-2856 is fixed
       //sort files by size to correct when normal skew is altered by bulk load
       Collections.sort(filesToCompact, StoreFile.Comparators.FILE_SIZE);



Mime
View raw message