You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zg...@apache.org on 2019/01/30 07:27:05 UTC
[hbase] branch branch-2.2 updated: HBASE-21535 Zombie Master
detector is not working
This is an automated email from the ASF dual-hosted git repository.
zghao pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.2 by this push:
new 2aead8e HBASE-21535 Zombie Master detector is not working
2aead8e is described below
commit 2aead8e33935e4865e668fc64588ec4e400cfa1d
Author: Pankaj <pa...@huawei.com>
AuthorDate: Mon Dec 3 14:33:11 2018 +0530
HBASE-21535 Zombie Master detector is not working
Signed-off-by: Guanghao Zhang <zg...@apache.org>
---
.../src/main/java/org/apache/hadoop/hbase/master/HMaster.java | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
index dc6fd73..568d9fd 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
@@ -904,11 +904,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.
*/
@@ -999,6 +994,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");