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:39:04 UTC

[hbase] branch branch-2.0 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.0
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new 9d5ec41  HBASE-21535 Zombie Master detector is not working
9d5ec41 is described below

commit 9d5ec41629e5ff4d6fd653e38f83366f38528bf7
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>
---
 .../main/java/org/apache/hadoop/hbase/master/HMaster.java    | 12 ++++++------
 1 file changed, 6 insertions(+), 6 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 f92e090..7cd6c5a 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
@@ -808,12 +808,6 @@ public class HMaster extends HRegionServer implements MasterServices {
    */
   private void finishActiveMasterInitialization(MonitoredTask status)
       throws IOException, InterruptedException, KeeperException {
-
-    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.
      */
@@ -883,6 +877,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");