HBASE-3988 Infinite loop for secondary master

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1136698 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2011-06-16 21:55:58 +00:00
parent ecce7c2cd7
commit 07b0a6d06c
2 changed files with 11 additions and 1 deletions

View File

@ -339,6 +339,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

View File

@ -185,7 +185,16 @@ class ActiveMasterManager extends ZooKeeperListener {
* @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() {