HBASE-11018 ZKUtil.getChildDataAndWatchForNewChildren() will not return null as indicated (Jerry He)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1589015 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3108c9a014
commit
57f8591001
@ -810,16 +810,17 @@ public class ZKUtil {
|
||||
ZooKeeperWatcher zkw, String baseNode) throws KeeperException {
|
||||
List<String> nodes =
|
||||
ZKUtil.listChildrenAndWatchForNewChildren(zkw, baseNode);
|
||||
List<NodeAndData> newNodes = new ArrayList<NodeAndData>();
|
||||
if (nodes != null) {
|
||||
List<NodeAndData> newNodes = new ArrayList<NodeAndData>();
|
||||
for (String node : nodes) {
|
||||
String nodePath = ZKUtil.joinZNode(baseNode, node);
|
||||
byte[] data = ZKUtil.getDataAndWatch(zkw, nodePath);
|
||||
newNodes.add(new NodeAndData(nodePath, data));
|
||||
}
|
||||
}
|
||||
return newNodes;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the data of an existing node with the expected version to have the
|
||||
|
Loading…
x
Reference in New Issue
Block a user