szepet commented on a change in pull request #922: ZOOKEEPER-3361: Add multi
version of getChildren request
URL: https://github.com/apache/zookeeper/pull/922#discussion_r283109596
##########
File path:
zookeeper-server/src/main/java/org/apache/zookeeper/server/FinalRequestProcessor.java
##########
@@ -468,6 +470,28 @@ public void processRequest(Request request) {
rsp = new GetChildren2Response(children, stat);
break;
}
+ case OpCode.getChildrenList: {
+ lastOp = "GETC";
+ GetChildrenListRequest getChildrenListRequest = new
GetChildrenListRequest();
+ ByteBufferInputStream.byteBuffer2Record(request.request,
+ getChildrenListRequest);
+ List<List<String>> childrenList = new
ArrayList<List<String>>();
+ for(String p : getChildrenListRequest.getPathList()) {
+ path = p;
+ DataNode n = zks.getZKDatabase().getNode(path);
+ if (n == null) {
Review comment:
Yeah, I was considering something like that, however, this way we could not
differentiate whether the request failed or it is a node without children.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services