HBASE-21535, Zombie Master detector is not working

This commit is contained in:
Pankaj 2018-12-18 00:49:22 +05:30 committed by stack
parent c448604ceb
commit fb58a23e56
1 changed files with 6 additions and 5 deletions

View File

@ -900,11 +900,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.
*/
@ -1001,6 +996,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");