You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2015/10/03 00:07:35 UTC
[3/4] hbase git commit: HBASE-13744 TestCorruptedRegionStoreFile is
flaky
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/08553051
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/08553051
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/08553051
Branch: refs/heads/branch-1.2
Commit: 0855305180a065f2783613826e005f74b4e41628
Parents: 2445d85
Author: Andrew Purtell <ap...@apache.org>
Authored: Fri Oct 2 13:28:59 2015 -0700
Committer: Andrew Purtell <ap...@apache.org>
Committed: Fri Oct 2 15:07:16 2015 -0700
----------------------------------------------------------------------
.../regionserver/TestCorruptedRegionStoreFile.java | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/08553051/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