hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1136699 - in /hbase/branches/0.90: CHANGES.txt src/main/java/org/apache/hadoop/hbase/master/ActiveMasterManager.java
Date Thu, 16 Jun 2011 21:56:35 GMT
Author: stack
Date: Thu Jun 16 21:56:34 2011
New Revision: 1136699

URL: http://svn.apache.org/viewvc?rev=1136699&view=rev
Log:
HBASE-3988 Infinite loop for secondary master

Modified:
    hbase/branches/0.90/CHANGES.txt
    hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/ActiveMasterManager.java

Modified: hbase/branches/0.90/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1136699&r1=1136698&r2=1136699&view=diff
==============================================================================
--- hbase/branches/0.90/CHANGES.txt (original)
+++ hbase/branches/0.90/CHANGES.txt Thu Jun 16 21:56:34 2011
@@ -37,6 +37,7 @@ Release 0.90.4 - Unreleased
                (Mikhail Bautin)
    HBASE-3948  Improve split/compact result page for RegionServer status page
                (Li Pi)
+   HBASE-3988  Infinite loop for secondary master (Liyin Tang)
 
   IMPROVEMENT
    HBASE-3882  hbase-config.sh needs to be updated so it can auto-detects the

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/ActiveMasterManager.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/ActiveMasterManager.java?rev=1136699&r1=1136698&r2=1136699&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/ActiveMasterManager.java
(original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/ActiveMasterManager.java
Thu Jun 16 21:56:34 2011
@@ -171,7 +171,16 @@ class ActiveMasterManager extends ZooKee
    * @return True if cluster has an active master.
    */
   public boolean isActiveMaster() {
-    return this.clusterHasActiveMaster.get();
+    try {
+      if (ZKUtil.checkExists(watcher, watcher.masterAddressZNode) >= 0) {
+        return true;
+      }
+    } 
+    catch (KeeperException ke) {
+      LOG.info("Received an unexpected KeeperException when checking " +
+          "isActiveMaster : "+ ke);
+    }
+    return false;
   }
 
   public void stop() {



Mime
View raw message