You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Ryan Payton <ry...@klicknation.com> on 2011/11/09 00:58:59 UTC

ZooKeeper.create()

I have created an object from the ZooKeeper() class, zoo. I am having
trouble finding the correct format for "zoo.create(String, path, byte[]
data, List<ACL> acl, CreateMode createmode)" The first,second, and fourth
arguments I understand (not quite sure why the data is a byte[] since you
can use strings for data through the CLI), but I am having trouble finding
documentation for List<ACL>. Any help would be appreciated. TYIA.

-- 
Ryan Payton
ryan@klicknation.com
Junior System Administrator
;-) Klicknation

Re: ZooKeeper.create()

Posted by Camille Fournier <ca...@apache.org>.
Try Ids.OPEN_ACL_UNSAFE to start with. If you click into the source
for that, you will see the ACL options for Java.

C

On Tue, Nov 8, 2011 at 6:58 PM, Ryan Payton <ry...@klicknation.com> wrote:
> I have created an object from the ZooKeeper() class, zoo. I am having
> trouble finding the correct format for "zoo.create(String, path, byte[]
> data, List<ACL> acl, CreateMode createmode)" The first,second, and fourth
> arguments I understand (not quite sure why the data is a byte[] since you
> can use strings for data through the CLI), but I am having trouble finding
> documentation for List<ACL>. Any help would be appreciated. TYIA.
>
> --
> Ryan Payton
> ryan@klicknation.com
> Junior System Administrator
> ;-) Klicknation
>

Re: ZooKeeper.create()

Posted by sunil singh <su...@yahoo.com>.
I hope this example will help you.
	byte [] info = {'c','o','n','f','i','g','=','1'};
		String create = zk1.create("/zk/child", info,Ids.OPEN_ACL_UNSAFE,
CreateMode.PERSISTENT);
		System.out.println(create);
	


Thanks,
Sunil Singh



--
View this message in context: http://zookeeper-user.578899.n2.nabble.com/ZooKeeper-create-tp6976443p7577855.html
Sent from the zookeeper-user mailing list archive at Nabble.com.