cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Kinder <dkin...@turnitin.com>
Subject Finding nodes that own a given token/partition key
Date Thu, 26 Mar 2015 20:21:39 GMT
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 = 'value';`, then do the math (put the ring
together) and figure out which node has the data. I'm assuming this is what
token aware drivers are doing.

Is there a simpler way to do this?

A bit more context: we'd like to move some processing closer to data, but
for a few reasons hadoop/spark aren't good options for the moment.

Mime
View raw message