etcd4j
etcd4j copied to clipboard
mousio.etcd4j.EtcdClient.getDir(String) has no effect
It seems that the function getDir(String) returns the same result as get(String). There's no difference between them. It sounds like the getDir should return "dir" nodes only, but in fact it returns all kinds of nodes. What's the purpose that the getDir() born for ?
getDir adds an additional attribute to the request, see:
- https://github.com/jurmous/etcd4j/blob/master/src/main/java/mousio/etcd4j/EtcdClient.java#L286
- https://github.com/jurmous/etcd4j/blob/master/src/main/java/mousio/etcd4j/requests/EtcdKeyGetRequest.java#L90
thanks for your quick response @lburgazzoli . but I found this attribute has no effect when adding to a GET request, as I tested against my etcd deployment. I mean these two requests have the same result: curl 'http://ip:port/v2/keys/somedir' curl 'http://ip:port/v2/keys/somedir?dir=true'
so what's the meaning to add this attribute to a GET request? I'm a new hand to etcd, so if my question is not proper, forgive me.
it was supposed to work, which etcd version?
On Wed, 19 Sep 2018 at 13:08, neilcheng [email protected] wrote:
thanks for your quick response @lburgazzoli https://github.com/lburgazzoli . but I found this attribute has no effect when adding to a GET request, as I tested against my etcd deployment. I mean these two requests have the same result: curl 'http://ip:port/v2/keys/somedir' curl 'http://ip:port/v2/keys/somedir?dir=true'
so what's the meaning to add this attribute to a GET request? I'm a new hand to etcd, so if my question is not proper, forgive me.
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/jurmous/etcd4j/issues/180#issuecomment-422759989, or mute the thread https://github.com/notifications/unsubscribe-auth/AByEhWx0MXEUepTbjyeHu9YLXVITnTIYks5uciW3gaJpZM4Wv5p1 .
--
Luca Burgazzoli