zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Dunning <ted.dunn...@gmail.com>
Subject Re: Why doesn't create() return a Stat object?
Date Fri, 04 Nov 2011 17:00:21 GMT
On Fri, Nov 4, 2011 at 9:54 AM, Mark Libucha <mlibucha@gmail.com> wrote:

>
> 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?
>

It mostly has to do with sequential files.  They get a name that you didn't
pass in.


> 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?
>

API changes are very painful, especially against what has to be one of the
top 5 methods in the entire package.

It is conceivable to add a create method that accepts a reference to a stat
object.

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