hadoop-zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Murali Vemulapati <mvemu...@yahoo-inc.com>
Subject barrier example
Date Mon, 10 Nov 2008 19:38:30 GMT
I believe there is a typo in the barrier example given at:

http://hadoop.apache.org/zookeeper/docs/current/zookeeperTutorial.html

With the following fix, the program runs as expected:
==============
83c83
<                 this.name = new 
String(InetAddress.getLocalHost().getCanonicalHostName().toString());
---
 >                 name = new 
String(InetAddress.getLocalHost().getCanonicalHostName().toString());
100c100
<                     CreateMode.EPHEMERAL_SEQUENTIAL);
---
 >                     CreateMode.EPHEMERAL);
==============
The first change assigns the name to the instance variable 'name' of 
Barrier class (otherwise the 'name' instance variable will have a value 
of 'null'
when calling zk.create to create the child node under the root barrier 
node).
The second change lets us run multiple processes on the same machine.

thanks
murali


Mime
View raw message