You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Kanwar Sangha <ka...@mavenir.com> on 2013/05/08 23:00:24 UTC

Replica info

Is there a way in Cassandra that we can know which node has the replica for the data ? if we have 4 nodes and RF = 2, is there a way we can find which 2 nodes have the same data ?

Thanks,
Kanwar


Re: Replica info

Posted by Michael Morris <mi...@gmail.com>.
Not directly, but you should be able to use the output of the getendpoints
operation, and of nodetool ring to find the IP address that matches the DC
you are looking for.

Thanks,

Mike


On Thu, May 9, 2013 at 11:08 AM, Kanwar Sangha <ka...@mavenir.com> wrote:

>  Thanks ! Is there also a way to find out the replica nodes ?****
>
> ** **
>
> Say we have 2 DCs, DC1 and DC2 with RF=2 (DC1:1, DC2:1)****
>
> ** **
>
> Can we find out which node in DC2 is a replica ?****
>
> ** **
>
> ** **
>
> ** **
>
> *From:* Edward Capriolo [mailto:edlinuxguru@gmail.com]
> *Sent:* 08 May 2013 21:08
> *To:* user@cassandra.apache.org
> *Subject:* Re: Replica info****
>
> ** **
>
> http://www.datastax.com/docs/1.1/references/nodetool#nodetool-getendpoints
> ****
>
> This tells you where a key lives. (you need to hex encode the key)****
>
> ** **
>
> On Wed, May 8, 2013 at 5:14 PM, Hiller, Dean <De...@nrel.gov> wrote:
> ****
>
> nodetool describering {keyspace}
>
>
> From: Kanwar Sangha <ka...@mavenir.com>>
> Reply-To: "user@cassandra.apache.org<ma...@cassandra.apache.org>" <
> user@cassandra.apache.org<ma...@cassandra.apache.org>>
> Date: Wednesday, May 8, 2013 3:00 PM
> To: "user@cassandra.apache.org<ma...@cassandra.apache.org>" <
> user@cassandra.apache.org<ma...@cassandra.apache.org>>
> Subject: Replica info
>
> Is there a way in Cassandra that we can know which node has the replica
> for the data ? if we have 4 nodes and RF = 2, is there a way we can find
> which 2 nodes have the same data ?
>
> Thanks,
> Kanwar****
>
> ** **
>

RE: Replica info

Posted by Kanwar Sangha <ka...@mavenir.com>.
Thanks ! Is there also a way to find out the replica nodes ?

Say we have 2 DCs, DC1 and DC2 with RF=2 (DC1:1, DC2:1)

Can we find out which node in DC2 is a replica ?



From: Edward Capriolo [mailto:edlinuxguru@gmail.com]
Sent: 08 May 2013 21:08
To: user@cassandra.apache.org
Subject: Re: Replica info

http://www.datastax.com/docs/1.1/references/nodetool#nodetool-getendpoints
This tells you where a key lives. (you need to hex encode the key)

On Wed, May 8, 2013 at 5:14 PM, Hiller, Dean <De...@nrel.gov>> wrote:
nodetool describering {keyspace}


From: Kanwar Sangha <ka...@mavenir.com>>>
Reply-To: "user@cassandra.apache.org<ma...@cassandra.apache.org>>" <us...@cassandra.apache.org>>>
Date: Wednesday, May 8, 2013 3:00 PM
To: "user@cassandra.apache.org<ma...@cassandra.apache.org>>" <us...@cassandra.apache.org>>>
Subject: Replica info

Is there a way in Cassandra that we can know which node has the replica for the data ? if we have 4 nodes and RF = 2, is there a way we can find which 2 nodes have the same data ?

Thanks,
Kanwar


Re: Replica info

Posted by Edward Capriolo <ed...@gmail.com>.
http://www.datastax.com/docs/1.1/references/nodetool#nodetool-getendpoints

This tells you where a key lives. (you need to hex encode the key)


On Wed, May 8, 2013 at 5:14 PM, Hiller, Dean <De...@nrel.gov> wrote:

> nodetool describering {keyspace}
>
>
> From: Kanwar Sangha <ka...@mavenir.com>>
> Reply-To: "user@cassandra.apache.org<ma...@cassandra.apache.org>" <
> user@cassandra.apache.org<ma...@cassandra.apache.org>>
> Date: Wednesday, May 8, 2013 3:00 PM
> To: "user@cassandra.apache.org<ma...@cassandra.apache.org>" <
> user@cassandra.apache.org<ma...@cassandra.apache.org>>
> Subject: Replica info
>
> Is there a way in Cassandra that we can know which node has the replica
> for the data ? if we have 4 nodes and RF = 2, is there a way we can find
> which 2 nodes have the same data ?
>
> Thanks,
> Kanwar
>
>

Re: Replica info

Posted by Tyler Hobbs <ty...@datastax.com>.
You also might be interested in nodetool getendpoints <keyspace> <cf>
<key>, which prints the nodes that are replicas for a given key


On Wed, May 8, 2013 at 4:14 PM, Hiller, Dean <De...@nrel.gov> wrote:

> nodetool describering {keyspace}
>
>
> From: Kanwar Sangha <ka...@mavenir.com>>
> Reply-To: "user@cassandra.apache.org<ma...@cassandra.apache.org>" <
> user@cassandra.apache.org<ma...@cassandra.apache.org>>
> Date: Wednesday, May 8, 2013 3:00 PM
> To: "user@cassandra.apache.org<ma...@cassandra.apache.org>" <
> user@cassandra.apache.org<ma...@cassandra.apache.org>>
> Subject: Replica info
>
> Is there a way in Cassandra that we can know which node has the replica
> for the data ? if we have 4 nodes and RF = 2, is there a way we can find
> which 2 nodes have the same data ?
>
> Thanks,
> Kanwar
>
>


-- 
Tyler Hobbs
DataStax <http://datastax.com/>

Re: Replica info

Posted by "Hiller, Dean" <De...@nrel.gov>.
nodetool describering {keyspace}


From: Kanwar Sangha <ka...@mavenir.com>>
Reply-To: "user@cassandra.apache.org<ma...@cassandra.apache.org>" <us...@cassandra.apache.org>>
Date: Wednesday, May 8, 2013 3:00 PM
To: "user@cassandra.apache.org<ma...@cassandra.apache.org>" <us...@cassandra.apache.org>>
Subject: Replica info

Is there a way in Cassandra that we can know which node has the replica for the data ? if we have 4 nodes and RF = 2, is there a way we can find which 2 nodes have the same data ?

Thanks,
Kanwar