HBASE-21535 Zombie Master detector is not working

Signed-off-by: Guanghao Zhang <zghao@apache.org>
This commit is contained in:
Pankaj 2018-12-03 14:33:11 +05:30 committed by Guanghao Zhang
parent 9b6c055727
commit c96af287bf
1 changed files with 6 additions and 5 deletions

View File

@ -845,11 +845,6 @@ public class HMaster extends HRegionServer implements MasterServices {
*/
private void finishActiveMasterInitialization(MonitoredTask status)
throws IOException, InterruptedException, KeeperException, ReplicationException {
Thread zombieDetector = new Thread(new InitializationMonitor(this),
"ActiveMasterInitializationMonitor-" + System.currentTimeMillis());
zombieDetector.setDaemon(true);
zombieDetector.start();
/*
* We are active master now... go initialize components we need to run.
*/
@ -919,6 +914,12 @@ public class HMaster extends HRegionServer implements MasterServices {
// Set ourselves as active Master now our claim has succeeded up in zk.
this.activeMaster = true;
// Start the Zombie master detector after setting master as active, see HBASE-21535
Thread zombieDetector = new Thread(new InitializationMonitor(this),
"ActiveMasterInitializationMonitor-" + System.currentTimeMillis());
zombieDetector.setDaemon(true);
zombieDetector.start();
// This is for backwards compatibility
// See HBASE-11393
status.setStatus("Update TableCFs node in ZNode");