You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Christian Decker <de...@gmail.com> on 2010/10/29 16:43:55 UTC

Fast way to find responsible nodes for a key?

Hi all,

I'm trying to find the most efficient way to find a node in the cluster
(from the client side) that may hold a copy of rows I'm querying for. The
scenario is quite simple: I have a hadoop job which reads an index and then
has several thousands of keys, now I want to find a way to efficiently
retrieve the according rows from the cluster, for this I have to find the
node that is responsible for the key. Am I right in the assumption that I
can just calculate the MD5 hash (in random partitioner) of the keys, order
them according to their hash, then order the TokenRanges by their endToken
and then do a merge sort?

Is there a faster way to do this?

Regards,
Chris