You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by mb...@apache.org on 2016/07/28 17:47:45 UTC

[1/2] hbase git commit: HBASE-16293 TestSnapshotFromMaster#testSnapshotHFileArchiving flakey (Huaxiang Sun)

Repository: hbase
Updated Branches:
  refs/heads/branch-1 d349f642c -> 968e464ae
  refs/heads/master 00c2a5da7 -> 64804a049


HBASE-16293 TestSnapshotFromMaster#testSnapshotHFileArchiving flakey (Huaxiang Sun)


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

Branch: refs/heads/master
Commit: 64804a04973d8cbbdd7f1cf6b008cebffc6c3733
Parents: 00c2a5d
Author: Matteo Bertozzi <ma...@cloudera.com>
Authored: Thu Jul 28 10:42:30 2016 -0700
Committer: Matteo Bertozzi <ma...@cloudera.com>
Committed: Thu Jul 28 10:42:30 2016 -0700

----------------------------------------------------------------------
 .../hbase/master/cleaner/TestSnapshotFromMaster.java      | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/64804a04/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java
index 1cc9eda..650171d 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java
@@ -91,6 +91,7 @@ public class TestSnapshotFromMaster {
       TableName.valueOf("test");
   // refresh the cache every 1/2 second
   private static final long cacheRefreshPeriod = 500;
+  private static final int blockingStoreFiles = 12;
 
   /**
    * Setup the config for the cluster
@@ -115,7 +116,7 @@ public class TestSnapshotFromMaster {
     conf.setInt("hbase.hstore.compaction.min", 2);
     conf.setInt("hbase.hstore.compactionThreshold", 5);
     // block writes if we get to 12 store files
-    conf.setInt("hbase.hstore.blockingStoreFiles", 12);
+    conf.setInt("hbase.hstore.blockingStoreFiles", blockingStoreFiles);
     // Ensure no extra cleaners on by default (e.g. TimeToLiveHFileCleaner)
     conf.set(HFileCleaner.MASTER_HFILE_CLEANER_PLUGINS, "");
     conf.set(HConstants.HBASE_MASTER_LOGCLEANER_PLUGINS, "");
@@ -280,7 +281,6 @@ public class TestSnapshotFromMaster {
    */
   @Test(timeout = 300000)
   public void testSnapshotHFileArchiving() throws Exception {
-    int hfileCount = 20;
     Admin admin = UTIL.getHBaseAdmin();
     // make sure we don't fail on listing snapshots
     SnapshotTestingUtils.assertNoSnapshots(admin);
@@ -293,13 +293,9 @@ public class TestSnapshotFromMaster {
     UTIL.createTable(htd, new byte[][] { TEST_FAM }, null);
 
     // load the table
-    while(true) {
+    for (int i = 0; i < blockingStoreFiles / 2; i ++) {
       UTIL.loadTable(UTIL.getConnection().getTable(TABLE_NAME), TEST_FAM);
       UTIL.flush(TABLE_NAME);
-      Collection<String> hfiles = getHFiles(rootDir, fs, TABLE_NAME);
-      if (hfiles.size() >= hfileCount) {
-        break;
-      }
     }
 
     // disable the table so we can take a snapshot


[2/2] hbase git commit: HBASE-16293 TestSnapshotFromMaster#testSnapshotHFileArchiving flakey (Huaxiang Sun)

Posted by mb...@apache.org.
HBASE-16293 TestSnapshotFromMaster#testSnapshotHFileArchiving flakey (Huaxiang Sun)


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

Branch: refs/heads/branch-1
Commit: 968e464aedb6c70d4ab5acf03269d12274f9cbfc
Parents: d349f64
Author: Matteo Bertozzi <ma...@cloudera.com>
Authored: Thu Jul 28 10:42:30 2016 -0700
Committer: Matteo Bertozzi <ma...@cloudera.com>
Committed: Thu Jul 28 10:42:58 2016 -0700

----------------------------------------------------------------------
 .../hbase/master/cleaner/TestSnapshotFromMaster.java      | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/968e464a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java
index 1d3b9f1..2dacd44 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java
@@ -90,6 +90,7 @@ public class TestSnapshotFromMaster {
       TableName.valueOf("test");
   // refresh the cache every 1/2 second
   private static final long cacheRefreshPeriod = 500;
+  private static final int blockingStoreFiles = 12;
 
   /**
    * Setup the config for the cluster
@@ -114,7 +115,7 @@ public class TestSnapshotFromMaster {
     conf.setInt("hbase.hstore.compaction.min", 2);
     conf.setInt("hbase.hstore.compactionThreshold", 5);
     // block writes if we get to 12 store files
-    conf.setInt("hbase.hstore.blockingStoreFiles", 12);
+    conf.setInt("hbase.hstore.blockingStoreFiles", blockingStoreFiles);
     // Ensure no extra cleaners on by default (e.g. TimeToLiveHFileCleaner)
     conf.set(HFileCleaner.MASTER_HFILE_CLEANER_PLUGINS, "");
     conf.set(HConstants.HBASE_MASTER_LOGCLEANER_PLUGINS, "");
@@ -279,7 +280,6 @@ public class TestSnapshotFromMaster {
    */
   @Test(timeout = 300000)
   public void testSnapshotHFileArchiving() throws Exception {
-    int hfileCount = 20;
     Admin admin = UTIL.getHBaseAdmin();
     // make sure we don't fail on listing snapshots
     SnapshotTestingUtils.assertNoSnapshots(admin);
@@ -293,13 +293,9 @@ public class TestSnapshotFromMaster {
     UTIL.createTable(htd, new byte[][] { TEST_FAM }, null);
 
     // load the table
-    while(true) {
+    for (int i = 0; i < blockingStoreFiles / 2; i ++) {
       UTIL.loadTable(UTIL.getConnection().getTable(TABLE_NAME), TEST_FAM);
       UTIL.flush(TABLE_NAME);
-      Collection<String> hfiles = getHFiles(rootDir, fs, TABLE_NAME);
-      if (hfiles.size() >= hfileCount) {
-        break;
-      }
     }
 
     // disable the table so we can take a snapshot