Thanks Edward !
On Sun, Jun 22, 2014 at 8:32 PM, Edward Ribeiro <[email protected]> wrote: > Hi, > > Rakesh already answered your question, but let me just reinforce some > points: > > > On Fri, Jun 20, 2014 at 10:50 AM, Lahiru Gunathilake <[email protected]> > wrote: > > > > > so the usecase is when two clients try to create same nodes with same > name > > > > z > > > > k > > > > > > ch > > > > a > > > > n > > > > g > > > > e > > > > > > t > > > > h > > > > e > > > > > > n > > > > a > > > > m > > > > i > > > > n > > > > g > > > > > > ? > > > > > > > > Nope. When creating a sequential znode you inform a prefix (e.g., "serv_") > and ZK provides the number part. The final name will be your prefix + the > number (i.e., serv_0000007). The big plus is that the number part is > atomically and sequentially provided so no more than one client will create > the znode with this full path name. > > > > > I > > > > > > > > > > f my system is well defined and no ra > > > > ndom node > > > > creation I do not need this feature ? > > > > > > This feature is used for leader election among ZK clients, for example. > Other cases can for sure make use of sequential znodes. > > > > > > > > In this case can I just get th > > > > e node with /leader/serv or should I get with > > /leader/serv_000000001 > > > > > > Later option, as Rakesh wrote. > > > > > > > > > > Anyways for my application I do not need this because I do not have a > > scenario where naming is nondeterministic between zk clients. > > > > > > I would not say that it is "non deterministic". More like, you have an > atomically increasing numbered znode suffix name. ;) > > Regards, > Edward > -- System Analyst Programmer PTI Lab Indiana University
