dineshappavoo commented on issue #735: ZOOKEEPER-3209: New `getEphemerals` api 
to get all the ephemeral nodes created by the session
URL: https://github.com/apache/zookeeper/pull/735#issuecomment-454585581
 
 
   @maoling not sure I understand the comment, I might be missing some 
information here. But when you query a path not starting with `/` the 
`getEphemerals` api already shows that message `Path must start with / 
character`.
   
   In case if the user does not pass any value for the `path` it returns all 
the ephemeral nodes created by the session. That is the expected functionality 
of the API. Otherwise based on the path prefix it returns all the ephemerals 
matching that prefix.
   ```
   [zk: 127.0.0.1:2181(CONNECTED) 5] create -e /test-get-ephemerals "ephemeral 
node"
   Created /test-get-ephemerals
   [zk: 127.0.0.1:2181(CONNECTED) 6] getEphemerals
   [/test-get-ephemerals]
   [zk: 127.0.0.1:2181(CONNECTED) 7] getEphemerals /
   [/test-get-ephemerals]
   [zk: 127.0.0.1:2181(CONNECTED) 8] getEphemerals abc
   Path must start with / character
   [zk: 127.0.0.1:2181(CONNECTED) 9] getEphemerals /test
   [/test-get-ephemerals]
   [zk: 127.0.0.1:2181(CONNECTED) 10]
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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

Reply via email to