Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Zookeeper >> mail # user >> Re: need for more conditional write support


+
Dave Wright 2010-12-16, 16:16
+
Ted Dunning 2010-12-16, 18:01
+
Dave Wright 2010-12-16, 18:06
+
Jared Cantwell 2010-12-16, 18:39
+
Henry Robinson 2010-12-16, 19:04
+
Ted Dunning 2010-12-16, 19:21
+
Ted Dunning 2010-12-16, 19:22
+
Ted Dunning 2010-12-16, 19:23
+
Ted Dunning 2010-12-16, 19:25
+
Qian Ye 2010-12-21, 02:56
+
Ted Dunning 2010-12-21, 03:22
+
Benjamin Reed 2010-12-21, 05:24
+
Benjamin Reed 2010-12-21, 05:24
+
Ted Dunning 2010-12-21, 06:08
+
Benjamin Reed 2010-12-21, 06:57
+
Jared Cantwell 2010-12-21, 21:16
+
Henry Robinson 2010-12-21, 21:30
+
Ted Dunning 2010-12-21, 21:48
Copy link to this message
-
Re: need for more conditional write support
I think this is the interface Ted eluded to, but I wanted to throw it out
there more concretely:

zoo_multi_test_and_set(List<string> znodesToTest, List<int>
versions, List<string> znodesToModify, List<OperationType>
typeOfModifications, List<byte[]> data)

You can still keep it a subset by requiring that creations explicitly set
the test version to -1.  This type of interface would really open up the
capability of multi_test_and_set().  I have no idea how much more
complicated it would be to implement, but I can imagine each operation type
having Test() and Commit() operations.  I think that by limiting it to only
updates from the start we may do work that will need reversed to make this
extension on the interface functional.

~Jared

On Tue, Dec 21, 2010 at 4:48 PM, Ted Dunning <[EMAIL PROTECTED]> wrote:

> On Tue, Dec 21, 2010 at 1:30 PM, Henry Robinson <[EMAIL PROTECTED]>
> wrote:
>
> > This is a more complicated requirement, and not something that can be
> done
> > right now with Zookeeper even in a single operation on a single znode.
> The
> > only conditional operations are updates.
>
>
> Actually, creates and deletes are conditional also.  Creates are
> conditional
> on the file
> not existing previously and deletes can accept a version number.
>
>
> > Designing an API to support three
> > different kinds of operation would also be more complicated, and the
> > implementation would be trickier.
> >
>
> This is definitely true.  Conceptually it is the same thing, but
> practically
> building a usable API is
> a bit tricky.  Using a builder style would work, though.  For example:
>
>       Zookeeper zk = ...;
>
>
>       zk.transaction()
>                .create("/foobar")
>                .update("/pig", data, version)
>                .delete("/dog"", otherVersion)
>                .commit()
>
> Another option would be to pass a list of operations which can be one of
> Create, Update or delete.
>
+
Ted Dunning 2010-12-22, 02:06
+
Henry Robinson 2010-12-22, 09:00
+
Ted Dunning 2010-12-22, 18:29
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB