Re: Finding nodes that own a given token/partition key

2015-03-26 Thread Dan Kinder
Thanks guys, think both of these answer my question. Guess I had overlooked nodetool getendpoints. Hopefully findable by future googlers now. On Thu, Mar 26, 2015 at 2:37 PM, Adam Holmberg wrote: > Dan, > > Depending on your context, many of the DataStax drivers have the token > ring exposed cli

Re: Finding nodes that own a given token/partition key

2015-03-26 Thread Adam Holmberg
Dan, Depending on your context, many of the DataStax drivers have the token ring exposed client-side. For example, Python: http://datastax.github.io/python-driver/api/cassandra/metadata.html#tokens-and-ring-topology Java: http://www.datastax.com/drivers/java/2.1/com/datastax/driver/core/Metadata.

Re: Finding nodes that own a given token/partition key

2015-03-26 Thread Roman Tkachenko
Hi Dan, Have you tried using "nodetool getendpoints"? It shows you nodes that currently own the specific key. Roman On Thu, Mar 26, 2015 at 1:21 PM, Dan Kinder wrote: > Hey all, > > In certain cases it would be useful for us to find out which node(s) have > the data for a given token/partition

Finding nodes that own a given token/partition key

2015-03-26 Thread Dan Kinder
Hey all, In certain cases it would be useful for us to find out which node(s) have the data for a given token/partition key. The only solutions I'm aware of is to select from system.local and/or system.peers to grab the host_id and tokens, do `SELECT token(thing) FROM myks.mytable WHERE thing = '