Yeah, i also find the problem of "Java Sample" Anyone has the permissions to create some?
2012/2/23 Shelley, Ryan <[email protected]> > Would the multi-txn API docs be somewhere I can peruse? I haven't found > anything on the site or via Google, and the sources don't seem to have > JavaDocs on them. All I can seem to find on the usage of the Java API are > the Java examples, and those don't have an example of doing a multi-op. > > -Ryan > > On 2/21/12 5:19 PM, "Henry Robinson" <[email protected]> wrote: > > >It seems like the multi-txn API might be helpful here. Since each path is > >of known length, you could have a multi-op query that is > > > >get(/a/b/c/d), get(/a/b/c), get(/a/b), get(/a) > > > >and then check the results of each in order. > > > >Henry > > > >On 21 February 2012 16:45, Shelley, Ryan <[email protected]> wrote: > > > >> Hi folks. Very new to ZooKeeper and evaluating it for a project. The ZK > >> directory-like layout is perfect for what I'm working on, for record > >> storage, with one caveat. I'm curious if there's a way to set it up to > >> return default records in the event a specific record isn't available > >>(I'm > >> attempting to reduce the number of round-trips to retrieve some data). > >> > >> For example: > >> > >> I create a node named "foo" with the data "lorem_ipsum": > >> create /foo lorem_ipsum > >> > >> Then I create a node named "bar" under "foo" with the data "baz": > >> create /foo/bar baz > >> > >> If I get "/foo/bar" obviously I'll get "baz", however, if I try to get > >> "/foo/blah" I'd like to get "lorem_ipsum." I know this is highly > >>suspect as > >> a design pattern, but there's a method to the madness. We want to create > >> records that can be overridden by sub-records (like "/foo/bar"), but in > >>the > >> event that sub-record doesn't exist, I'd get back the next concrete > >>record. > >> > >> Any thoughts? Thanks! > >> > >> -Ryan > >> > > > > > > > >-- > >Henry Robinson > >Software Engineer > >Cloudera > >415-994-6679 > >
