hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HBASE-19558) TestRegionsOnMasterOptions hack so it works reliablly
Date Wed, 20 Dec 2017 00:01:06 GMT

     [ https://issues.apache.org/jira/browse/HBASE-19558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

stack resolved HBASE-19558.
---------------------------
    Resolution: Fixed

I pushed the below which just waits until there are not RIT before it calls cluster shutdown


commit f80d2e9c8e88d3eaeed9a174c770699737f8c574
Author: Michael Stack <stack@apache.org>
Date:   Tue Dec 19 15:57:11 2017 -0800

    HBASE-19558 TestRegionsOnMasterOptions hack so it works reliably

diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRegionsOnMasterOptions.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRegionsOnMasterOptions.java
index 7319820d39..58c33331db 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRegionsOnMasterOptions.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRegionsOnMasterOptions.java
@@ -193,6 +193,15 @@ public class TestRegionsOnMasterOptions {
         // still only carry system regions post crash.
         assertEquals(masterCount, mNewActualCount);
       }
+      // Disable balancer and wait till RIT done else cluster won't go down.
+      TEST_UTIL.getAdmin().balancerSwitch(false, true);
+      while (true) {
+        if (!TEST_UTIL.getHBaseCluster().getMaster().getAssignmentManager().
+            isMetaRegionInTransition()) {
+          break;
+        }
+        Threads.sleep(10);
+      }
     } finally {
       LOG.info("Running shutdown of cluster");
       TEST_UTIL.shutdownMiniCluster();

> TestRegionsOnMasterOptions hack so it works reliablly
> -----------------------------------------------------
>
>                 Key: HBASE-19558
>                 URL: https://issues.apache.org/jira/browse/HBASE-19558
>             Project: HBase
>          Issue Type: Bug
>          Components: test
>            Reporter: stack
>            Assignee: stack
>             Fix For: 2.0.0-beta-1
>
>
> See tail of HBASE-19533 for description of problem; our shutdown of a cluster needs work.
Meantime hack the test so it doesn't hang on close so it passes reliably again.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message