hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdcry...@apache.org
Subject svn commit: r1403581 - /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java
Date Mon, 29 Oct 2012 23:44:57 GMT
Author: jdcryans
Date: Mon Oct 29 23:44:56 2012
New Revision: 1403581

URL: http://svn.apache.org/viewvc?rev=1403581&view=rev
Log:
HBASE-6700  [replication] empty znodes created during queue failovers aren't
            deleted (Terry Zhang via JD)

Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java?rev=1403581&r1=1403580&r2=1403581&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java
Mon Oct 29 23:44:56 2012
@@ -844,14 +844,14 @@ public class ReplicationZookeeper implem
         // number-startcode-number-otherstartcode-number-anotherstartcode-etc
         String newCluster = cluster+"-"+znode;
         String newClusterZnode = ZKUtil.joinZNode(rsServerNameZnode, newCluster);
-        ZKUtil.createNodeIfNotExistsAndWatch(this.zookeeper, newClusterZnode,
-          HConstants.EMPTY_BYTE_ARRAY);
         String clusterPath = ZKUtil.joinZNode(nodePath, cluster);
         List<String> hlogs = ZKUtil.listChildrenNoWatch(this.zookeeper, clusterPath);
         // That region server didn't have anything to replicate for this cluster
         if (hlogs == null || hlogs.size() == 0) {
           continue;
         }
+        ZKUtil.createNodeIfNotExistsAndWatch(this.zookeeper, newClusterZnode,
+            HConstants.EMPTY_BYTE_ARRAY);
         SortedSet<String> logQueue = new TreeSet<String>();
         queues.put(newCluster, logQueue);
         for (String hlog : hlogs) {



Mime
View raw message