incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kais Ahmed <k...@neteck-fr.com>
Subject Re: How to determine which node(s) an insert would go to in C* 2.0 with vnodes?
Date Tue, 08 Oct 2013 12:49:16 GMT
hi,

you can try :

nodetool  getendpoints <keyspace> <cf> <key> - Print the end points that
owns the key


2013/10/8 Christopher Wirt <chris.wirt@struq.com>

> In CQL there is a token() function you can use to find the result of your
> partitioning schemes hash function for any value.****
>
> ** **
>
> e.g. select token(value) from column_family1 where partition_column =
> value;****
>
> ** **
>
> You then need to find out which nodes are responsible for that value using
> nodetool ring or looking at system.peers table for tokens****
>
> ** **
>
> Not that straight forward esp. with 100 nodes and vNodes. Maybe someone
> has written a script or something to do this already?****
>
> ** **
>
> Or I suppose you could turn on tracing and repeat the query until you’ve
> seen it hit three different end nodes?****
>
> i.e.****
>
> tracing on;****
>
> select * from column_family1 where partition_column = value;****
>
> ** **
>
> ** **
>
> ** **
>
> *From:* Sameer Farooqui [mailto:sameer@blueplastic.com]
> *Sent:* 08 October 2013 10:20
> *To:* user@cassandra.apache.org
> *Subject:* How to determine which node(s) an insert would go to in C* 2.0
> with vnodes?****
>
> ** **
>
> Hi,
>
> When using C* 2.0 in a large 100 node cluster with Murmer3Hash, vnodes and
> 256 tokens assigned to each node, is it possible to find out where a
> certain key is destined to go?****
>
> If the keyspace defined has replication factor = 3, then a specific key
> like 'row-1' would be destined to go to 3 nodes, right? Is there a way I
> can pre-determine which of the 3 nodes out of 100 that that insert of
> 'row-1' would go to?****
>
> Or alternatively, after I've already written the 'row-1', can I find out
> which 3 nodes it went to?****
>

Mime
View raw message