Yes, you need to implement the org.apache.cassandra.dht.IPartitioner interface, 
there are a couple of abstract implementations you could base it on. 

> I want all even keys to go to
> node1 and odd keys to node2, is it feasible ?

I'm not endorsing the idea of doing this, but as a hack to see if the effects 
you could use the BOP and format the keys as (python):

str(key % 2) + "{0:0>#10}".format(key)

So all keys are 11 digit strings, even keys start with 0 and odd with 1. 

Hope that helps. 

-----------------
Aaron Morton
Freelance Developer
@aaronmorton
http://www.thelastpickle.com

On 14/08/2012, at 7:33 AM, A J <s5a...@gmail.com> wrote:

> Is it possible to use a custom Partitioner type (other than RP or BOP) ?
> Say if my rowkeys are all Integers and I want all even keys to go to
> node1 and odd keys to node2, is it feasible ? How would I go about ?
> 
> Thanks.

Reply via email to