zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wendy Smoak <wsm...@gmail.com>
Subject Re: Command Line arguments for ZooKeeper Java example
Date Sat, 01 Nov 2014 15:25:39 GMT
So that you can see the start, stop, and restart behavior, I updated
this to use a trivial 'program' (bash script) that counts up 1, 2, 3,
with a five second delay.

https://github.com/wsmoak/zookeeper/tree/master/simple-watch

Here is what it might look like:

(In the command line interface)
[zk: localhost:2181(CONNECTED) 16] create /stuff my_data
Created /stuff
[zk: localhost:2181(CONNECTED) 17] set /stuff other_data
[zk: localhost:2181(CONNECTED) 18] delete /stuff

(running the watcher example)
2014-11-01 11:05:43,908 [myid:] - INFO
[main-SendThread(localhost:2181):ClientCnxn$SendThread@1346] - Session
establishment complete on server localhost/127.0.0.1:2181, sessionid =
0x1496bca44fe0002, negotiated timeout = 4000
Starting child
1
2
3
4
Stopping child
Starting child
1
2
3
Killing process

-Wendy

Mime
View raw message