You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Ben Bangert <be...@groovie.org> on 2013/07/19 03:31:21 UTC
Re: Use zookeeper with Cassandra
On May 15, 2013, at 1:10 PM, Dilip Kumar <Di...@hcl.com> wrote:
> Thanks Kim. I am using Hector API. My manager is asking to integrate Zookeeper with Cassandra. I am exploring possibilities and benefit of this integration.
This shouldn't be needed. Cassandra 2.0 beta includes CAS operations which implement a Paxos subset.
Cheers,
Ben
Re: Use zookeeper with Cassandra
Posted by Brian Tarbox <br...@gmail.com>.
Many thanks for the clear and concise explanation! I'll check out the
slides.
Brian
On Fri, Jul 19, 2013 at 11:29 AM, Ben Bangert <be...@groovie.org> wrote:
> On Jul 19, 2013, at 5:59 AM, Brian Tarbox <br...@gmail.com> wrote:
>
> > Can you say more about this? We use Zookeeper to manage a large set of
> > "work units" which are selected, locked, processed by EC2 worker
> > computers...which then do work on and with Cassandra data.
>
> Sure, there's two parts to it. First, holding a lock external to Cassandra
> itself has its own issue. This is because while you might be able to
> guarantee that only one person is doing something with Cassandra, short of
> using CL.ALL, there's no way to fully ensure that two people don't stomp on
> updates. If you use CL.QUORUM, its still possible that a node could be
> holding hints, client releases ZK lock, another client gets the lock, does
> a read and if timed poorly will not see the prior change.
>
> Cassandra's CAS operation properly deals with this since its handled
> inside Cassandra itself.
>
> Jonathan Ellis went over why client locks don't work for Cassandra at the
> Cassandra Summit, slides from his talk here:
> http://www.slideshare.net/jbellis/cassandra-summit-2013-keynote
>
> He goes over CAS on slide 52-60.
>
> Cheers,
> Ben
--
http://about.me/BrianTarbox
Re: Use zookeeper with Cassandra
Posted by Ben Bangert <be...@groovie.org>.
On Jul 19, 2013, at 5:59 AM, Brian Tarbox <br...@gmail.com> wrote:
> Can you say more about this? We use Zookeeper to manage a large set of
> "work units" which are selected, locked, processed by EC2 worker
> computers...which then do work on and with Cassandra data.
Sure, there's two parts to it. First, holding a lock external to Cassandra itself has its own issue. This is because while you might be able to guarantee that only one person is doing something with Cassandra, short of using CL.ALL, there's no way to fully ensure that two people don't stomp on updates. If you use CL.QUORUM, its still possible that a node could be holding hints, client releases ZK lock, another client gets the lock, does a read and if timed poorly will not see the prior change.
Cassandra's CAS operation properly deals with this since its handled inside Cassandra itself.
Jonathan Ellis went over why client locks don't work for Cassandra at the Cassandra Summit, slides from his talk here:
http://www.slideshare.net/jbellis/cassandra-summit-2013-keynote
He goes over CAS on slide 52-60.
Cheers,
Ben
Re: Use zookeeper with Cassandra
Posted by Brian Tarbox <br...@gmail.com>.
Can you say more about this? We use Zookeeper to manage a large set of
"work units" which are selected, locked, processed by EC2 worker
computers...which then do work on and with Cassandra data.
On Thu, Jul 18, 2013 at 9:31 PM, Ben Bangert <be...@groovie.org> wrote:
> On May 15, 2013, at 1:10 PM, Dilip Kumar <Di...@hcl.com> wrote:
>
> > Thanks Kim. I am using Hector API. My manager is asking to integrate
> Zookeeper with Cassandra. I am exploring possibilities and benefit of this
> integration.
>
> This shouldn't be needed. Cassandra 2.0 beta includes CAS operations which
> implement a Paxos subset.
>
> Cheers,
> Ben
--
http://about.me/BrianTarbox