HBASE-6700 [replication] empty znodes created during queue failovers aren't
deleted (Terry Zhang via JD) git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1403581 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e7d4f965a1
commit
02fa99f9f0
|
@ -844,14 +844,14 @@ public class ReplicationZookeeper implements Closeable{
|
|||
// 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) {
|
||||
|
|
Loading…
Reference in New Issue