hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [2/4] hbase git commit: HBASE-13744 TestCorruptedRegionStoreFile is flaky
Date Fri, 02 Oct 2015 22:07:34 GMT
HBASE-13744 TestCorruptedRegionStoreFile is flaky


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/d7c7cc8c
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/d7c7cc8c
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/d7c7cc8c

Branch: refs/heads/branch-1
Commit: d7c7cc8c8c137ef997545275cc373b6c8a0bb725
Parents: 54dc20e
Author: Andrew Purtell <apurtell@apache.org>
Authored: Fri Oct 2 13:28:59 2015 -0700
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Fri Oct 2 15:07:13 2015 -0700

----------------------------------------------------------------------
 .../regionserver/TestCorruptedRegionStoreFile.java  | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/d7c7cc8c/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCorruptedRegionStoreFile.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCorruptedRegionStoreFile.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCorruptedRegionStoreFile.java
index dce19d6..969ef34 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCorruptedRegionStoreFile.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCorruptedRegionStoreFile.java
@@ -28,6 +28,7 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.client.HTable;
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.ResultScanner;
@@ -49,9 +50,7 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
 
 @Category(LargeTests.class)
 public class TestCorruptedRegionStoreFile {
@@ -62,7 +61,7 @@ public class TestCorruptedRegionStoreFile {
   private static final String FAMILY_NAME_STR = "f";
   private static final byte[] FAMILY_NAME = Bytes.toBytes(FAMILY_NAME_STR);
 
-  private static final int NUM_FILES = 25;
+  private static final int NUM_FILES = 10;
   private static final int ROW_PER_FILE = 2000;
   private static final int NUM_ROWS = NUM_FILES * ROW_PER_FILE;
 
@@ -73,9 +72,9 @@ public class TestCorruptedRegionStoreFile {
   private int rowCount;
 
   private static void setupConf(Configuration conf) {
-    conf.setLong("hbase.hstore.compaction.min", 20);
-    conf.setLong("hbase.hstore.compaction.max", 39);
-    conf.setLong("hbase.hstore.blockingStoreFiles", 40);
+    // Disable compaction so the store file count stays constant
+    conf.setLong("hbase.hstore.compactionThreshold", NUM_FILES + 1);
+    conf.setLong("hbase.hstore.blockingStoreFiles", NUM_FILES * 2);
   }
 
   private void setupTable(final TableName tableName) throws IOException {
@@ -93,6 +92,7 @@ public class TestCorruptedRegionStoreFile {
 
         if ((rowCount++ % ROW_PER_FILE) == 0) {
           // flush it
+          ((HTable)table).flushCommits();
           UTIL.getHBaseAdmin().flush(tableName);
         }
       }
@@ -114,8 +114,8 @@ public class TestCorruptedRegionStoreFile {
         storeFiles.add(link.getOriginPath());
       }
     });
-    assertTrue("expected at least 1 store file", storeFiles.size() > 0);
-    LOG.info("store-files: " + storeFiles);
+    assertTrue("Expected at least " + NUM_FILES + " store files", storeFiles.size() >=
NUM_FILES);
+    LOG.info("Store files: " + storeFiles);
   }
 
   @Before


Mime
View raw message