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:18 UTC
svn commit: r1141313 - in /hbase/trunk: CHANGES.txt
src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java
Author: jdcryans
Date: Wed Jun 29 23:08:18 2011
New Revision: 1141313
URL: http://svn.apache.org/viewvc?rev=1141313&view=rev
Log:
HBASE-4045 [replication] NPE in ReplicationSource when ZK is gone
Modified:
hbase/trunk/CHANGES.txt
hbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java
Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1141313&r1=1141312&r2=1141313&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Wed Jun 29 23:08:18 2011
@@ -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
Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java?rev=1141313&r1=1141312&r2=1141313&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java Wed Jun 29 23:08:18 2011
@@ -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;
}
/**