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:30:58 UTC

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


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

commit c96af287bf4d7fc9c81a909cb81596c8f0aa8fe6
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 3f13a45..18de2fd 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
@@ -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");