hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-15192 TestRegionMergeTransactionOnCluster#testCleanMergeReference is flaky
Date Tue, 02 Feb 2016 17:42:26 GMT
Repository: hbase
Updated Branches:
  refs/heads/master fc5e698c0 -> 243e6cc52


HBASE-15192 TestRegionMergeTransactionOnCluster#testCleanMergeReference is flaky


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

Branch: refs/heads/master
Commit: 243e6cc5293dc1e2a4dfd3af4ee29087c84184c8
Parents: fc5e698
Author: tedyu <yuzhihong@gmail.com>
Authored: Tue Feb 2 09:42:15 2016 -0800
Committer: tedyu <yuzhihong@gmail.com>
Committed: Tue Feb 2 09:42:15 2016 -0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/master/CatalogJanitor.java |  1 +
 .../TestRegionMergeTransactionOnCluster.java           | 13 +++++++++----
 2 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/243e6cc5/hbase-server/src/main/java/org/apache/hadoop/hbase/master/CatalogJanitor.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/CatalogJanitor.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/CatalogJanitor.java
index ef2a005..d02e5ae 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/CatalogJanitor.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/CatalogJanitor.java
@@ -214,6 +214,7 @@ public class CatalogJanitor extends ScheduledChore {
   int scan() throws IOException {
     try {
       if (!alreadyRunning.compareAndSet(false, true)) {
+        LOG.debug("CatalogJanitor already running");
         return 0;
       }
       Triple<Integer, Map<HRegionInfo, Result>, Map<HRegionInfo, Result>>
scanTriple =

http://git-wip-us.apache.org/repos/asf/hbase/blob/243e6cc5/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionMergeTransactionOnCluster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionMergeTransactionOnCluster.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionMergeTransactionOnCluster.java
index 44b24ce..e3f6cc2 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionMergeTransactionOnCluster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionMergeTransactionOnCluster.java
@@ -268,8 +268,8 @@ public class TestRegionMergeTransactionOnCluster {
         cleaner.chore();
         Thread.sleep(1000);
       }
-      int newcount1 = 0;
       while (System.currentTimeMillis() < timeout) {
+        int newcount1 = 0;
         for(HColumnDescriptor colFamily : columnFamilies) {
           newcount1 += hrfs.getStoreFiles(colFamily.getName()).size();
         }
@@ -280,10 +280,15 @@ public class TestRegionMergeTransactionOnCluster {
       }
       // run CatalogJanitor to clean merge references in hbase:meta and archive the
       // files of merging regions
-      int cleaned = admin.runCatalogScan();
+      int cleaned = 0;
+      while (cleaned == 0) {
+        cleaned = admin.runCatalogScan();
+        LOG.debug("catalog janitor returned " + cleaned);
+        Thread.sleep(50);
+      }
+      assertFalse(regionAdir.toString(), fs.exists(regionAdir));
+      assertFalse(regionBdir.toString(), fs.exists(regionBdir));
       assertTrue(cleaned > 0);
-      assertFalse(fs.exists(regionAdir));
-      assertFalse(fs.exists(regionBdir));
 
       mergedRegionResult = MetaTableAccessor.getRegionResult(
         master.getConnection(), mergedRegionInfo.getRegionName());


Mime
View raw message