HBASE-4045 [replication] NPE in ReplicationSource when ZK is gone

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1141313 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jean-Daniel Cryans 2011-06-29 23:08:18 +00:00
parent f0120d5a47
commit 1d0975f581
2 changed files with 5 additions and 4 deletions

View File

@ -381,6 +381,7 @@ Release 0.90.4 - Unreleased
(Vandana Ayyalasomayajula via Ted Yu)
HBASE-3984 CT.verifyRegionLocation isn't doing a very good check,
can delay cluster recovery
HBASE-4045 [replication] NPE in ReplicationSource when ZK is gone
IMPROVEMENT
HBASE-3882 hbase-config.sh needs to be updated so it can auto-detects the

View File

@ -219,16 +219,16 @@ public class ReplicationZookeeper {
/**
* Get the list of all the region servers from the specified peer
* @param zkw zk connection to use
* @return list of region server addresses
* @return list of region server addresses or an empty list if the slave
* is unavailable
*/
private List<ServerName> fetchSlavesAddresses(ZooKeeperWatcher zkw) {
List<ServerName> rss = null;
try {
rss = listChildrenAndGetAsServerNames(zkw, zkw.rsZNode);
return listChildrenAndGetAsServerNames(zkw, zkw.rsZNode);
} catch (KeeperException e) {
LOG.warn("Cannot get peer's region server addresses", e);
return new ArrayList<ServerName>(0);
}
return rss;
}
/**