jurmous / etcd4j

Java / Netty client for etcd, the highly-available key value store for shared configuration and service discovery.
Apache License 2.0
267 stars 83 forks source link

I found client.getDir("/").recursive().send().get() can not get all nodes! #143

Closed wjw465150 closed 7 years ago

wjw465150 commented 7 years ago

source code:

     EtcdKeysResponse response = client.getDir("/").recursive().send().get();

      java.util.List<EtcdKeysResponse.EtcdNode> nodes = response.node.getNodes();
      for (EtcdKeysResponse.EtcdNode node : nodes) {
        if (node.isDir()) {
          System.out.println(node.key);
        } else {
          System.out.println(node.key + ":" + node.value);
        }
      }

it can not return all nodes,it just return The first layer nodes!

wjw465150 commented 7 years ago

i found recursive() return all nodes,but it is nested!

1309893329 commented 6 years ago

你好,这个问题我也遇到了,不知如何解决,望帮助,谢谢!