You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Dilip Kumar <Di...@hcl.com> on 2013/05/15 18:28:41 UTC

Use zookeeper with Cassandra

Hi All,

I am working in a project to use Cassandra. We are trying to use Zookeeper to manage Cassandra clusters. We are looking for following

1. Zookeeper in cluster mode (I installed and it is working fine)
2. Allow Zookeeper to monitor Cassandra cluster (I don't know how to do this)
3. Use Zookeeper to perform atomic transaction for Cassandra 

Please help. I did lot of search on Google.com however couldn't find anything specific to this. There are some thread to use Cage library for Zookeeper and Cassandra however I am stuck at first level to how to use Zookeeper for Cassandra first?

Please help.

Thanks,
Dilip Kumar
 


::DISCLAIMER::
----------------------------------------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents
(with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates.
Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the
views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of this message without the prior written consent of authorized representative of
HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately.
Before opening any email and/or attachments, please check them for viruses and other defects.

----------------------------------------------------------------------------------------------------------------------------------------------------


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

Re: Use zookeeper with Cassandra

Posted by Ben Bangert <be...@groovie.org>.
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 Dilip Kumar <Di...@hcl.com>.
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.  

Please advice. 

Thanks,
Dilip Kumar

-----Original Message-----
From: Jordan Zimmerman [mailto:jordan@jordanzimmerman.com] 
Sent: Wednesday, May 15, 2013 3:33 PM
To: user@zookeeper.apache.org
Subject: Re: Use zookeeper with Cassandra

Astayanx can do it too :)

On May 15, 2013, at 12:31 PM, Owen Kim <oh...@gmail.com> wrote:

> In what way are you hoping to monitor Cassandra and what Cassandra 
> client are you using? I couldn't speak to exactly what you're asking 
> but if you're looking for just looking to detect what nodes are in the 
> Cassandra cluster, some clients like Hector can handle retry and 
> discovery for you by querying Cassandra directly for the ring.
> 
> 
> On Wed, May 15, 2013 at 9:28 AM, Dilip Kumar <Di...@hcl.com> wrote:
> 
>> Hi All,
>> 
>> I am working in a project to use Cassandra. We are trying to use 
>> Zookeeper to manage Cassandra clusters. We are looking for following
>> 
>> 1. Zookeeper in cluster mode (I installed and it is working fine) 2. 
>> Allow Zookeeper to monitor Cassandra cluster (I don't know how to do
>> this)
>> 3. Use Zookeeper to perform atomic transaction for Cassandra
>> 
>> Please help. I did lot of search on Google.com however couldn't find 
>> anything specific to this. There are some thread to use Cage library 
>> for Zookeeper and Cassandra however I am stuck at first level to how 
>> to use Zookeeper for Cassandra first?
>> 
>> Please help.
>> 
>> Thanks,
>> Dilip Kumar
>> 
>> 
>> 
>> ::DISCLAIMER::
>> 
>> ---------------------------------------------------------------------
>> ---------------------------------------------------------------------
>> ----------
>> 
>> The contents of this e-mail and any attachment(s) are confidential 
>> and intended for the named recipient(s) only.
>> E-mail transmission is not guaranteed to be secure or error-free as 
>> information could be intercepted, corrupted, lost, destroyed, arrive 
>> late or incomplete, or may contain viruses in transmission. The e 
>> mail and its contents (with or without referred errors) shall 
>> therefore not attach any liability on the originator or HCL or its 
>> affiliates.
>> Views or opinions, if any, presented in this email are solely those 
>> of the author and may not necessarily reflect the views or opinions 
>> of HCL or its affiliates. Any form of reproduction, dissemination, 
>> copying, disclosure, modification, distribution and / or publication 
>> of this message without the prior written consent of authorized 
>> representative of HCL is strictly prohibited. If you have received 
>> this email in error please delete it and notify the sender 
>> immediately.
>> Before opening any email and/or attachments, please check them for 
>> viruses and other defects.
>> 
>> 
>> ---------------------------------------------------------------------
>> ---------------------------------------------------------------------
>> ----------
>> 
>> 


Re: Use zookeeper with Cassandra

Posted by Jordan Zimmerman <jo...@jordanzimmerman.com>.
Astayanx can do it too :)

On May 15, 2013, at 12:31 PM, Owen Kim <oh...@gmail.com> wrote:

> In what way are you hoping to monitor Cassandra and what Cassandra client
> are you using? I couldn't speak to exactly what you're asking but if you're
> looking for just looking to detect what nodes are in the Cassandra cluster,
> some clients like Hector can handle retry and discovery for you by querying
> Cassandra directly for the ring.
> 
> 
> On Wed, May 15, 2013 at 9:28 AM, Dilip Kumar <Di...@hcl.com> wrote:
> 
>> Hi All,
>> 
>> I am working in a project to use Cassandra. We are trying to use Zookeeper
>> to manage Cassandra clusters. We are looking for following
>> 
>> 1. Zookeeper in cluster mode (I installed and it is working fine)
>> 2. Allow Zookeeper to monitor Cassandra cluster (I don't know how to do
>> this)
>> 3. Use Zookeeper to perform atomic transaction for Cassandra
>> 
>> Please help. I did lot of search on Google.com however couldn't find
>> anything specific to this. There are some thread to use Cage library for
>> Zookeeper and Cassandra however I am stuck at first level to how to use
>> Zookeeper for Cassandra first?
>> 
>> Please help.
>> 
>> Thanks,
>> Dilip Kumar
>> 
>> 
>> 
>> ::DISCLAIMER::
>> 
>> ----------------------------------------------------------------------------------------------------------------------------------------------------
>> 
>> The contents of this e-mail and any attachment(s) are confidential and
>> intended for the named recipient(s) only.
>> E-mail transmission is not guaranteed to be secure or error-free as
>> information could be intercepted, corrupted,
>> lost, destroyed, arrive late or incomplete, or may contain viruses in
>> transmission. The e mail and its contents
>> (with or without referred errors) shall therefore not attach any liability
>> on the originator or HCL or its affiliates.
>> Views or opinions, if any, presented in this email are solely those of the
>> author and may not necessarily reflect the
>> views or opinions of HCL or its affiliates. Any form of reproduction,
>> dissemination, copying, disclosure, modification,
>> distribution and / or publication of this message without the prior
>> written consent of authorized representative of
>> HCL is strictly prohibited. If you have received this email in error
>> please delete it and notify the sender immediately.
>> Before opening any email and/or attachments, please check them for viruses
>> and other defects.
>> 
>> 
>> ----------------------------------------------------------------------------------------------------------------------------------------------------
>> 
>> 


Re: Use zookeeper with Cassandra

Posted by Owen Kim <oh...@gmail.com>.
In what way are you hoping to monitor Cassandra and what Cassandra client
are you using? I couldn't speak to exactly what you're asking but if you're
looking for just looking to detect what nodes are in the Cassandra cluster,
some clients like Hector can handle retry and discovery for you by querying
Cassandra directly for the ring.


On Wed, May 15, 2013 at 9:28 AM, Dilip Kumar <Di...@hcl.com> wrote:

> Hi All,
>
> I am working in a project to use Cassandra. We are trying to use Zookeeper
> to manage Cassandra clusters. We are looking for following
>
> 1. Zookeeper in cluster mode (I installed and it is working fine)
> 2. Allow Zookeeper to monitor Cassandra cluster (I don't know how to do
> this)
> 3. Use Zookeeper to perform atomic transaction for Cassandra
>
> Please help. I did lot of search on Google.com however couldn't find
> anything specific to this. There are some thread to use Cage library for
> Zookeeper and Cassandra however I am stuck at first level to how to use
> Zookeeper for Cassandra first?
>
> Please help.
>
> Thanks,
> Dilip Kumar
>
>
>
> ::DISCLAIMER::
>
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
> The contents of this e-mail and any attachment(s) are confidential and
> intended for the named recipient(s) only.
> E-mail transmission is not guaranteed to be secure or error-free as
> information could be intercepted, corrupted,
> lost, destroyed, arrive late or incomplete, or may contain viruses in
> transmission. The e mail and its contents
> (with or without referred errors) shall therefore not attach any liability
> on the originator or HCL or its affiliates.
> Views or opinions, if any, presented in this email are solely those of the
> author and may not necessarily reflect the
> views or opinions of HCL or its affiliates. Any form of reproduction,
> dissemination, copying, disclosure, modification,
> distribution and / or publication of this message without the prior
> written consent of authorized representative of
> HCL is strictly prohibited. If you have received this email in error
> please delete it and notify the sender immediately.
> Before opening any email and/or attachments, please check them for viruses
> and other defects.
>
>
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>