You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by JKnight JKnight <be...@gmail.com> on 2010/01/07 10:53:38 UTC

Change Partitioner

Dear all,

Because we want to traverser all data, we need to change partitioner to
ordered type.

I want to change Partitioner from org.apache.cassandra.dht.RandomPartitioner
to
org.apache.cassandra.dht.OrderPreservingPartitioner.

How can I do that?

Thank a lot for support.
-- 
Best regards,
JKnight

Re: Change Partitioner

Posted by JKnight JKnight <be...@gmail.com>.
Dear Mark,

I used only one server.  I only change partitioner in configuration. The
error is "key must be in order".



On Thu, Jan 7, 2010 at 6:45 AM, Mark Robson <ma...@gmail.com> wrote:

> 2010/1/7 JKnight JKnight <be...@gmail.com>
>
> Dear all,
>>
>> Because we want to traverser all data, we need to change partitioner to
>> ordered type.
>>
>> I want to change Partitioner from
>> org.apache.cassandra.dht.RandomPartitioner to
>> org.apache.cassandra.dht.OrderPreservingPartitioner.
>>
>> How can I do that?
>>
>
> Well, start by prototyping the change in your test environment and checking
> that with a large data load, the keys you're using are likely to get spread
> evenly between the nodes (Hint: They probably won't).
>
> Then make any changes to get evenly spread keys.
>
> Of course changing the keys is an incompatible change as well.
>
> I hope you don't have any production data in there.
>
> Then blow away your entire data and restart the nodes with
> OrderPreservingParitioner
>
> Mark
>



-- 
Best regards,
JKnight

Re: Change Partitioner

Posted by Mark Robson <ma...@gmail.com>.
2010/1/7 JKnight JKnight <be...@gmail.com>

> Dear all,
>
> Because we want to traverser all data, we need to change partitioner to
> ordered type.
>
> I want to change Partitioner from
> org.apache.cassandra.dht.RandomPartitioner to
> org.apache.cassandra.dht.OrderPreservingPartitioner.
>
> How can I do that?
>

Well, start by prototyping the change in your test environment and checking
that with a large data load, the keys you're using are likely to get spread
evenly between the nodes (Hint: They probably won't).

Then make any changes to get evenly spread keys.

Of course changing the keys is an incompatible change as well.

I hope you don't have any production data in there.

Then blow away your entire data and restart the nodes with
OrderPreservingParitioner

Mark