cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Morton <aa...@thelastpickle.com>
Subject Re: OPP + Hash on client side
Date Wed, 07 Jul 2010 10:15:24 GMT
That pattern is discussed here http://ria101.wordpress.com/2010/02/22/cassandra-randompartitioner-vs-orderpreservingpartitioner/

It's also used in http://github.com/tjake/Lucandra

You can do range queries with the Random Partitioner in 0.6.*, the order of the return is
undefined and it's a bit slower. 

I think it's normally used when you want ordered range queries in some CF's and random distribution
in others. 

Aaron

On 07 Jul, 2010,at 09:47 PM, David Boxenhorn <david@lookin2.com> wrote:

Is there any strategy for using OPP with a hash algorithm on the client side to get both uniform
distribution of data in the cluster *and* the ability to do range queries? 

I'm thinking of something like this:

cassKey = (key % 97) + "@" + key;

cassRange = 0 + "@" + range; 1 + "@" + range; ... 96 + "@" + range;

Would something like that work? 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
    • Unnamed multipart/related (inline, None, 0 bytes)
View raw message