zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Libucha <mlibu...@gmail.com>
Subject Why doesn't create() return a Stat object?
Date Fri, 04 Nov 2011 16:54:36 GMT
It seems to me that, like the synchronous write() methods, the synchronous
create() method should return a Stat object. Why doesn't it? I know I could
get the Stat object with a subsequent exists() call, but that leaves me
vulnerable to a possible update window by another writer.

Also, the javadoc says the synchronous create(): "Returns: the actual path
of the created node". It's not clear exactly what that means, and how it
might be different from the path argument that gets passed to it? Does this
have to do with whether or a not a chroot suffix was specified in
constructor's connectString?

Seems to me like the Stat object should contain the chroot-relative path
and the "actual path" -- if these are indeed different -- and create()
should return a Stat object. But not knowing the ZK internals, maybe that
would be a resource issue?

Thanks for any insight you can offer,


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message