You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2015/09/04 19:28:03 UTC

hbase git commit: HBASE-14327 TestIOFencing#testFencingAroundCompactionAfterWALSync is flaky (Heng Chen)

Repository: hbase
Updated Branches:
  refs/heads/master b7a67c638 -> de0e72f46


HBASE-14327 TestIOFencing#testFencingAroundCompactionAfterWALSync is flaky (Heng Chen)


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

Branch: refs/heads/master
Commit: de0e72f464560cd59d836f651291e12fcbf78e73
Parents: b7a67c6
Author: stack <st...@apache.org>
Authored: Fri Sep 4 10:27:49 2015 -0700
Committer: stack <st...@apache.org>
Committed: Fri Sep 4 10:27:49 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/TestIOFencing.java    | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/de0e72f4/hbase-server/src/test/java/org/apache/hadoop/hbase/TestIOFencing.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestIOFencing.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestIOFencing.java
index 7d644bd..6223b15 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestIOFencing.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestIOFencing.java
@@ -323,6 +323,12 @@ public class TestIOFencing {
 
       newRegion = (CompactionBlockerRegion)newServer.getOnlineRegion(REGION_NAME);
 
+      // After compaction of old region finishes on the server that was going down, make sure that
+      // all the files we expect are still working when region is up in new location.
+      FileSystem fs = newRegion.getFilesystem();
+      for (String f: newRegion.getStoreFileList(new byte [][] {FAMILY})) {
+        assertTrue("After compaction, does not exist: " + f, fs.exists(new Path(f)));
+      }
       LOG.info("Allowing compaction to proceed");
       compactingRegion.allowCompactions();
       while (compactingRegion.compactCount == 0) {
@@ -331,12 +337,7 @@ public class TestIOFencing {
       // The server we killed stays up until the compaction that was started before it was killed completes.  In logs
       // you should see the old regionserver now going down.
       LOG.info("Compaction finished");
-      // After compaction of old region finishes on the server that was going down, make sure that
-      // all the files we expect are still working when region is up in new location.
-      FileSystem fs = newRegion.getFilesystem();
-      for (String f: newRegion.getStoreFileList(new byte [][] {FAMILY})) {
-        assertTrue("After compaction, does not exist: " + f, fs.exists(new Path(f)));
-      }
+
       // If we survive the split keep going...
       // Now we make sure that the region isn't totally confused.  Load up more rows.
       TEST_UTIL.loadNumericRows(table, FAMILY, FIRST_BATCH_COUNT, FIRST_BATCH_COUNT + SECOND_BATCH_COUNT);