hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r1353813 - in /hbase/branches/0.94/src: main/java/org/apache/hadoop/hbase/regionserver/Store.java test/java/org/apache/hadoop/hbase/io/hfile/TestScannerSelectionUsingTTL.java
Date Tue, 26 Jun 2012 04:25:22 GMT
Author: apurtell
Date: Tue Jun 26 04:25:21 2012
New Revision: 1353813

URL: http://svn.apache.org/viewvc?rev=1353813&view=rev
Log:
HBASE-6267. hbase.store.delete.expired.storefile should be true by default

Modified:
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
    hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/io/hfile/TestScannerSelectionUsingTTL.java

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java?rev=1353813&r1=1353812&r2=1353813&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java (original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java Tue
Jun 26 04:25:21 2012
@@ -1344,7 +1344,7 @@ public class Store extends SchemaConfigu
     boolean forcemajor = this.forceMajor && filesCompacting.isEmpty();
     if (!forcemajor) {
       // Delete the expired store files before the compaction selection.
-      if (conf.getBoolean("hbase.store.delete.expired.storefile", false)
+      if (conf.getBoolean("hbase.store.delete.expired.storefile", true)
           && (ttl != Long.MAX_VALUE) && (this.scanInfo.minVersions == 0))
{
         CompactSelection expiredSelection = compactSelection
             .selectExpiredStoreFilesToCompact(

Modified: hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/io/hfile/TestScannerSelectionUsingTTL.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/io/hfile/TestScannerSelectionUsingTTL.java?rev=1353813&r1=1353812&r2=1353813&view=diff
==============================================================================
--- hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/io/hfile/TestScannerSelectionUsingTTL.java
(original)
+++ hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/io/hfile/TestScannerSelectionUsingTTL.java
Tue Jun 26 04:25:21 2012
@@ -27,6 +27,7 @@ import java.util.Set;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.HRegionInfo;
@@ -38,7 +39,6 @@ import org.apache.hadoop.hbase.client.Sc
 import org.apache.hadoop.hbase.io.hfile.BlockType.BlockCategory;
 import org.apache.hadoop.hbase.regionserver.HRegion;
 import org.apache.hadoop.hbase.regionserver.InternalScanner;
-import org.apache.hadoop.hbase.regionserver.StoreFile.BloomType;
 import org.apache.hadoop.hbase.regionserver.metrics.SchemaMetrics;
 import org.apache.hadoop.hbase.regionserver.metrics.SchemaMetrics.BlockMetricType;
 import org.apache.hadoop.hbase.util.Bytes;
@@ -98,6 +98,8 @@ public class TestScannerSelectionUsingTT
 
   @Test
   public void testScannerSelection() throws IOException {
+    Configuration conf = TEST_UTIL.getConfiguration();
+    conf.setBoolean("hbase.store.delete.expired.storefile", false);
     HColumnDescriptor hcd =
       new HColumnDescriptor(FAMILY_BYTES)
           .setMaxVersions(Integer.MAX_VALUE)
@@ -107,7 +109,7 @@ public class TestScannerSelectionUsingTT
     HRegionInfo info = new HRegionInfo(Bytes.toBytes(TABLE));
     HRegion region =
         HRegion.createHRegion(info, TEST_UTIL.getClusterTestDir(),
-            TEST_UTIL.getConfiguration(), htd);
+            conf, htd);
 
     for (int iFile = 0; iFile < totalNumFiles; ++iFile) {
       if (iFile == NUM_EXPIRED_FILES) {
@@ -127,7 +129,7 @@ public class TestScannerSelectionUsingTT
 
     Scan scan = new Scan();
     scan.setMaxVersions(Integer.MAX_VALUE);
-    CacheConfig cacheConf = new CacheConfig(TEST_UTIL.getConfiguration());
+    CacheConfig cacheConf = new CacheConfig(conf);
     LruBlockCache cache = (LruBlockCache) cacheConf.getBlockCache();
     cache.clearCache();
     InternalScanner scanner = region.getScanner(scan);



Mime
View raw message