Anything after the space is used to specify the version number. So you can only set the value of a znode as a single word or a number afaik.
Regards, Ganesh Chandrasekaran On Tue, May 20, 2014 at 3:49 PM, xytd <[email protected]> wrote: > Thanks for your kind reply. > > I tried it in zkCli.sh and I don't get the string back when using "get". > > [zk: node4:2181(CONNECTED) 11] create /topdir "this is a string" > Created /topdir > [zk: node4:2181(CONNECTED) 12] get /topdir > "this > cZxid = 0x200000008 > ctime = Tue May 20 12:47:10 PDT 2014 > mZxid = 0x200000008 > mtime = Tue May 20 12:47:10 PDT 2014 > pZxid = 0x200000008 > cversion = 0 > dataVersion = 0 > aclVersion = 0 > ephemeralOwner = 0x0 > dataLength = 5 > numChildren = 0 > > The dataLength is showing 5 as the length of the string "this. > > am I doing something wrong here? > > Thanks, > > Yang > > > > > -- > View this message in context: > http://zookeeper-user.578899.n2.nabble.com/newbie-question-how-to-set-a-znode-value-to-a-string-this-is-a-string-instead-of-a-single-word-tp7579915p7579920.html > Sent from the zookeeper-user mailing list archive at Nabble.com. >
