You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by "Han,Meng" <me...@ufl.edu> on 2014/04/22 22:51:36 UTC

which replica has your data?

Hi all,

I have a data item whose row key is 
7573657238353137303937323637363334393636363230
and I have a five node Cassandra cluster with replication factor set to 
3. Each replica's token is listed below

TOK: 0
TOK: 34028236692093846346337460743176821145
TOK: 68056473384187692692674921486353642291
TOK: 68056473384187692692674921486353642291
TOK: 102084710076281539039012382229530463436
TOK: 136112946768375385385349842972707284582

All the five nodes are on the same rack and I am using SimpleSnitch. 
Could someone tell me how can I know which replica has/stores that 
particular row above?

Is there any client side command that can query which replica has a 
certain row?

Thank loads!


Cheers,
Meng

Re: which replica has your data?

Posted by Robert Coli <rc...@eventbrite.com>.
On Tue, Apr 22, 2014 at 1:55 PM, Russell Bradberry <rb...@gmail.com>wrote:

> nodetool getendpoints <keyspace> <cf> <key>
>

That will tell OP what nodes *should* have the row... to answer which of
those replicas *actually have* the row, call the JMX
method getSSTablesForKey, on each node returned by getendpoints. If there
is at least one SSTable listed, the node *has* the row.

The code doesn't seem to differentiate between a tombstone or other masked
value, FWIW, so your client might not see a row that getSSTablesForKey says
is in the files.

=Rob

Re: which replica has your data?

Posted by Russell Bradberry <rb...@gmail.com>.
nodetool getendpoints <keyspace> <cf> <key>



On April 22, 2014 at 4:52:08 PM, Han,Meng (menghan@ufl.edu) wrote:

Hi all,  

I have a data item whose row key is  
7573657238353137303937323637363334393636363230  
and I have a five node Cassandra cluster with replication factor set to  
3. Each replica's token is listed below  

TOK: 0  
TOK: 34028236692093846346337460743176821145  
TOK: 68056473384187692692674921486353642291  
TOK: 68056473384187692692674921486353642291  
TOK: 102084710076281539039012382229530463436  
TOK: 136112946768375385385349842972707284582  

All the five nodes are on the same rack and I am using SimpleSnitch.  
Could someone tell me how can I know which replica has/stores that  
particular row above?  

Is there any client side command that can query which replica has a  
certain row?  

Thank loads!  


Cheers,  
Meng