[
https://issues.apache.org/jira/browse/HBASE-19598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16305465#comment-16305465
]
Balazs Meszaros commented on HBASE-19598:
-----------------------------------------
I have identified several problems:
1. The initialization hangs in {{HMaster.waitForMasterActive}}:
{code:java}
protected void waitForMasterActive(){
boolean tablesOnMaster = LoadBalancer.isTablesOnMaster(conf);
while (!(tablesOnMaster && activeMaster) && !isStopped() && !isAborted()) {
sleeper.sleep();
}
}
{code}
TablesOnMaster=false in this test case, so {{HMaster}} thread waits here. It is
called from {{HRegionServer.run}} -> {{preRegistrationInitialization}} ->
{{initializeZooKeeper}}.
2. Nobody calls {{HMaster.stop}}.
When we call {{TEST_UTIL.shutdownMiniCluster}} from the test case, then it
shuts down HBase mini cluster. After some function calls it enters into
{{JVMClusterUtil.shutdown}} and it calls {{HMaster.shutdown}}, which calls
{{ServerManager.shutdownCluster}}, but nobody calls {{HMaster.stop}}. That's
the reason why it hangs.
So how should we properly shut down the mini cluster?
> Fix TestAssignmentManagerMetrics flaky test
> -------------------------------------------
>
> Key: HBASE-19598
> URL: https://issues.apache.org/jira/browse/HBASE-19598
> Project: HBase
> Issue Type: Bug
> Affects Versions: 2.0.0-beta-1
> Reporter: Balazs Meszaros
> Assignee: Balazs Meszaros
>
> TestAssignmentManagerMetrics fails constantly. After bisecting, it seems that
> commit 010012cbcb broke it (HBASE-18946).
> The test method runs successfully, but it cannot shut the minicluster down,
> and hangs forever.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)