[ https://issues.apache.org/jira/browse/HBASE-20465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16445843#comment-16445843 ]
Balazs Meszaros commented on HBASE-20465: ----------------------------------------- I was not able to reproduce the error locally, but I think the cause of the problem is that master stop and start overlap each other, because we did not wait until master stops. {code:java} TEST_UTIL.getMiniHBaseCluster().stopMaster(0); // ... TEST_UTIL.getMiniHBaseCluster().startMaster(); TEST_UTIL.getMiniHBaseCluster().waitForActiveAndReadyMaster(60000); assertTrue(TEST_UTIL.getMiniHBaseCluster().getMaster() != null); {code} One possible scenario for the error: 1. Previous master is still running {{mt.getMaster().isActiveMaster() && mt.getMaster().isInitialized()}}, then {{waitForActiveAndReadyMaster}} will return. 2. Previous master stops, but new master hasn't started yet. 3. {{getMaster}} will return {{null}}, because no master thread satisfies this condition {{mt.getMaster().isActiveMaster() && !mt.getMaster().isStopped()}}. > Fix TestEnableRSGroup flaky > --------------------------- > > Key: HBASE-20465 > URL: https://issues.apache.org/jira/browse/HBASE-20465 > Project: HBase > Issue Type: Bug > Components: rsgroup > Affects Versions: 2.0.0 > Reporter: Balazs Meszaros > Assignee: Balazs Meszaros > Priority: Major > Fix For: 2.0.0 > > Attachments: HBASE-20465.master.001.patch > > > Most recent {{TestEnableRSGroup}} tests failed on branch-2.0 according to our > flaky dashboard. > {code} > java.lang.AssertionError > at > org.apache.hadoop.hbase.rsgroup.TestEnableRSGroup.testEnableRSGroup(TestEnableRSGroup.java:80) > {code} > TestEnableRSGroup:80: > {code:java} > // check if master started successfully > assertTrue(TEST_UTIL.getMiniHBaseCluster().getMaster() != null); > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)