You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Kaushal Shriyan <ka...@gmail.com> on 2013/12/24 18:52:59 UTC
List nodes and sub nodes in zookeeper
Hi,
Is there a way to list all the nodes and sub nodes on the command line in
Zookeeper ?
Regards,
Kaushal
Re: List nodes and sub nodes in zookeeper
Posted by Raúl Gutiérrez Segalés <rg...@itevenworks.net>.
(this is getting potentially off-topic, so sorry to the list)
On 25 December 2013 14:26, Kaushal Shriyan <ka...@gmail.com> wrote:
> >> wrote:I am getting the below error
>
> zk-shell server:2181 --run-once "tree /"
> Traceback (most recent call last):
>
(...snip...)
Oh, you need Python 2.7 (I'll fix the setup.py to express that). And no,
you can run this from any host that can reach any of your ZK servers (the
leader — if it's serving —, the followers or the observers) (i.e.: you
should be able to reach them on 2181/tcp most likely).
-rgs
Re: List nodes and sub nodes in zookeeper
Posted by Kaushal Shriyan <ka...@gmail.com>.
On Wed, Dec 25, 2013 at 2:59 PM, Kaushal Shriyan
<ka...@gmail.com>wrote:
> On Wed, Dec 25, 2013 at 2:56 PM, Raúl Gutiérrez Segalés <
> rgs@itevenworks.net> wrote:
>
>> On 24 December 2013 09:52, Kaushal Shriyan <ka...@gmail.com>
>> wrote:
>>
>> > Hi,
>> >
>> > Is there a way to list all the nodes and sub nodes on the command line
>> in
>> > Zookeeper ?
>> >
>>
>> You can do this with zk_shell:
>>
>> $ pip install zk_shell
>> $ zk-shell server:2181 --run-once "tree /"
>>
>>
> Thanks Raul for the reply, Do i need to install zk_shell on the server
> where zookeeper leader or observer process is running?
> I am not sure if i understand it completely.
>
> Thanks and Regards,
>
> Kaushal
>
>
Hi
I am getting the below error
zk-shell server:2181 --run-once "tree /"
Traceback (most recent call last):
File "/usr/bin/zk-shell", line 3, in <module>
from zk_shell.cli import CLI
File "/usr/lib/python2.6/site-packages/zk_shell/cli.py", line 7, in
<module>
from .shell import Shell
File "/usr/lib/python2.6/site-packages/zk_shell/shell.py", line 50, in
<module>
from .copy import copy, CopyError
File "/usr/lib/python2.6/site-packages/zk_shell/copy.py", line 334
with src, dst:
^
SyntaxError: invalid syntax
# zk-shell 127.0.0.1:2181 --run-once "tree /"
Traceback (most recent call last):
File "/usr/bin/zk-shell", line 3, in <module>
from zk_shell.cli import CLI
File "/usr/lib/python2.6/site-packages/zk_shell/cli.py", line 7, in
<module>
from .shell import Shell
File "/usr/lib/python2.6/site-packages/zk_shell/shell.py", line 50, in
<module>
from .copy import copy, CopyError
File "/usr/lib/python2.6/site-packages/zk_shell/copy.py", line 334
with src, dst:
^
SyntaxError: invalid syntax
]#
Thanks and Regards,
Kaushal
Re: List nodes and sub nodes in zookeeper
Posted by Kaushal Shriyan <ka...@gmail.com>.
On Wed, Dec 25, 2013 at 2:56 PM, Raúl Gutiérrez Segalés <rgs@itevenworks.net
> wrote:
> On 24 December 2013 09:52, Kaushal Shriyan <ka...@gmail.com>
> wrote:
>
> > Hi,
> >
> > Is there a way to list all the nodes and sub nodes on the command line in
> > Zookeeper ?
> >
>
> You can do this with zk_shell:
>
> $ pip install zk_shell
> $ zk-shell server:2181 --run-once "tree /"
>
>
Thanks Raul for the reply, Do i need to install zk_shell on the server
where zookeeper leader or observer process is running?
I am not sure if i understand it completely.
Thanks and Regards,
Kaushal
Re: List nodes and sub nodes in zookeeper
Posted by Raúl Gutiérrez Segalés <rg...@itevenworks.net>.
On 24 December 2013 09:52, Kaushal Shriyan <ka...@gmail.com> wrote:
> Hi,
>
> Is there a way to list all the nodes and sub nodes on the command line in
> Zookeeper ?
>
You can do this with zk_shell:
$ pip install zk_shell
$ zk-shell server:2181 --run-once "tree /"
-rgs