You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Prashant Saraswat <pr...@pixalsoft.com> on 2012/01/20 00:14:34 UTC

zk.create throws KeeperError = nonode

Hi All,

Noobie question coming up.

The following lines of code produce a nonode error:

Zookeeper zk = new ZooKeeper("/test",3000,this);
if(null == zk.exists("test", false){
 zk.create("test",null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
}

However, if I first create the /test node using zkCli and then run the same
code the node does get created as /test/test.

I'm sure I'm missing something. I'm hoping one of you guys can help me out.

Thanks
PixalSoft

Re: zk.create throws KeeperError = nonode

Posted by Prashant Saraswat <pr...@pixalsoft.com>.
Sorry guys. User error. Please ignore.

On Thu, Jan 19, 2012 at 6:14 PM, Prashant Saraswat <
prashant.saraswat@pixalsoft.com> wrote:

> Hi All,
>
> Noobie question coming up.
>
> The following lines of code produce a nonode error:
>
> Zookeeper zk = new ZooKeeper("/test",3000,this);
> if(null == zk.exists("/test", false){
>  zk.create("/test",null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
> }
>
> However, if I first create the /test node using zkCli and then run the
> same code the node does get created as /test/test.
>
> I'm sure I'm missing something. I'm hoping one of you guys can help me out.
>
> Thanks
> PixalSoft
>