Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Zookeeper >> mail # user >> Howto use zkCli.sh with spaces in the data ?


Copy link to this message
-
Re: Howto use zkCli.sh with spaces in the data ?
Hi Sekine,

Flavio reported to me that it wasn't working with Python 3 so I released a
new version (0.92) which should support Py3.
Cheers,
-rgs
On 28 December 2013 14:53, Sékine Coulibaly <[EMAIL PROTECTED]> wrote:

> Hi Raul,
>
> Indeed it supports this, pretty well I must admit !
> Not tested filesystem to ZK copies but your tool looks like a damn good
> army knife. Good job !
>
> Thanks for helping.
>
> Rgds
>
> Sekine
>
>
> 2013/12/28 Raúl Gutiérrez Segalés <[EMAIL PROTECTED]>
>
> > FWIW, zk_shell [1] - a zkCli clone written in Python using Kazoo -
> supports
> > this.
> >
> > -rgs
> >
> > [1] get it via `pip install zk_shell`. It's still a bit beta but more
> > powerful than zkCli.
> > On Dec 28, 2013 8:30 AM, "Sékine Coulibaly" <[EMAIL PROTECTED]>
> wrote:
> >
> > > I wish I could use ZooKeeper to store json data.
> > >
> > > My json data contains spaces, eg :
> > >
> > >     {"country":"CA","name":"De La Salle"}
> > >
> > > Issuing the following command to zkClient only stores
> > > {"id":1,"fullname":"De which is wrong :
> > >
> > >     create /contacts/1  {"country":"CA","name":"De La Salle"}
> > >
> > > The store command seems to be croped after the first space of the data
> > >  payload.
> > >
> > > From what I can see, this issuehas been raised several times (eg. here
> > >
> > >
> >
> http://stackoverflow.com/questions/11408542/zookeeper-cli-read-znode-with-space
> > > and
> > > here
> > >
> > >
> >
> http://zookeeper-user.578899.n2.nabble.com/Best-way-to-update-node-using-command-line-td7578581.html
> > > )
> > > but I was unable to find a better workaround than "patch the java
> client
> > by
> > > yourself", so that the parameters are not splitted by a space.
> > >
> > > Are there any plans to fix this (yes, I suggest this is some kind of
> > bug"),
> > > or a working "escaping" trick ?
> > >
> > > Thank you
> > >
> >
>