You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by jd...@apache.org on 2011/06/30 01:08:03 UTC
svn commit: r1141312 - in /hbase/branches/0.90: CHANGES.txt
src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java
Author: jdcryans
Date: Wed Jun 29 23:08:03 2011
New Revision: 1141312
URL: http://svn.apache.org/viewvc?rev=1141312&view=rev
Log:
HBASE-4045 [replication] NPE in ReplicationSource when ZK is gone
Modified:
hbase/branches/0.90/CHANGES.txt
hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java
Modified: hbase/branches/0.90/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1141312&r1=1141311&r2=1141312&view=diff
==============================================================================
--- hbase/branches/0.90/CHANGES.txt (original)
+++ hbase/branches/0.90/CHANGES.txt Wed Jun 29 23:08:03 2011
@@ -51,6 +51,7 @@ Release 0.90.4 - Unreleased
(Vandana Ayyalasomayajula)
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
Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java?rev=1141312&r1=1141311&r2=1141312&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java (original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java Wed Jun 29 23:08:03 2011
@@ -220,16 +220,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<HServerAddress> fetchSlavesAddresses(ZooKeeperWatcher zkw) {
- List<HServerAddress> rss = null;
try {
- rss = ZKUtil.listChildrenAndGetAsAddresses(zkw, zkw.rsZNode);
+ return ZKUtil.listChildrenAndGetAsAddresses(zkw, zkw.rsZNode);
} catch (KeeperException e) {
LOG.warn("Cannot get peer's region server addresses", e);
+ return new ArrayList<HServerAddress>(0);
}
- return rss;
}
/**