diff --git a/CHANGES.txt b/CHANGES.txt index af5956fbb1a..21c07374889 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -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 diff --git a/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java b/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java index 4923bfbcf42..b6843b91269 100644 --- a/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java +++ b/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java @@ -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 fetchSlavesAddresses(ZooKeeperWatcher zkw) { - List 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(0); } - return rss; } /**