You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2018/12/31 12:45:55 UTC
[19/47] hbase git commit: HBASE-21535,
Zombie Master detector is not working
HBASE-21535, Zombie Master detector is not working
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/fb58a23e
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/fb58a23e
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/fb58a23e
Branch: refs/heads/HBASE-21512
Commit: fb58a23e56c8fe85820c97337da887eddf4bb9bb
Parents: c448604
Author: Pankaj <pa...@huawei.com>
Authored: Tue Dec 18 00:49:22 2018 +0530
Committer: stack <st...@apache.org>
Committed: Tue Dec 18 20:51:01 2018 -0800
----------------------------------------------------------------------
.../java/org/apache/hadoop/hbase/master/HMaster.java | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/fb58a23e/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
----------------------------------------------------------------------
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 a16e09d..0bcef59 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
@@ -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");