Re: TimeUUID Order Partitioner

2013-03-28 Thread Carlos Pérez Miguel
Apparently the MemTable..writeSortedContents has the same problem: I can see how it iterates over the stored keys in byte order, so my classes have something wrong. For the curious, these are my classes until now: https://gist.github.com/anonymous/5261611 Carlos Pérez Miguel 2013/3/28 aaron m

Re: TimeUUID Order Partitioner

2013-03-27 Thread aaron morton
> That is the order I would expect to find if I read the CF, but if I do, I > obtain (with any client or library I've tried): > What happens if you export sstables with sstable2json ? Put some logging in Memtable.FlushRunnable.writeSortedContents to see the order the rows are written Cheers

Re: TimeUUID Order Partitioner

2013-03-27 Thread Carlos Pérez Miguel
Thanks, Lanny. That is what I am doing. Actually I'm having another problem. My UUIDOrderedPartitioner doesn't order by time. Instead, it orders by byte order and I cannot find why. Which are the functions that control ordering between tokens? I have implemented time ordering in the "compareTo" fu

Re: TimeUUID Order Partitioner

2013-03-27 Thread Lanny Ripple
Ah. TimeUUID. Not as useful for you then but still something for the toolbox. On Mar 27, 2013, at 8:42 AM, Lanny Ripple wrote: > A type 4 UUID can be created from two Longs. You could MD5 your strings > giving you 128 hashed bits and then make UUIDs out of that. Using Scala: > > import ja

Re: TimeUUID Order Partitioner

2013-03-27 Thread Lanny Ripple
A type 4 UUID can be created from two Longs. You could MD5 your strings giving you 128 hashed bits and then make UUIDs out of that. Using Scala: import java.nio.ByteBuffer import java.security.MessageDigest import java.util.UUID val key = "Hello, World!" val md = MessageDigest

Re: TimeUUID Order Partitioner

2013-03-26 Thread aaron morton
> Any idea? Not off the top of my head. Cheers - Aaron Morton Freelance Cassandra Consultant New Zealand @aaronmorton http://www.thelastpickle.com On 26/03/2013, at 2:13 AM, Carlos Pérez Miguel wrote: > Yes it does. Thank you Aaron. > > Now I realized that the system keyspace

Re: TimeUUID Order Partitioner

2013-03-25 Thread Carlos Pérez Miguel
Yes it does. Thank you Aaron. Now I realized that the system keyspace uses string as keys, like "Ring" or "ClusterName", and I don't know how to convert these type of keys into UUID. Any idea? Carlos Pérez Miguel 2013/3/25 aaron morton > The best thing to do is start with a look at ByteOrder

Re: TimeUUID Order Partitioner

2013-03-24 Thread aaron morton
The best thing to do is start with a look at ByteOrderedPartitoner and AbstractByteOrderedPartitioner. You'll want to create a new TimeUUIDToken extends Token and a new UUIDPartitioner that extends AbstractPartitioner<> Usual disclaimer that ordered partitioners cause problems with load balanc

TimeUUID Order Partitioner

2013-03-24 Thread Carlos Pérez Miguel
Hi, I store in my system rows where the key is a UUID version1, TimeUUID. I would like to maintain rows ordered by time. I know that in this case, it is recomended to use an external CF where column names are UUID ordered by time. But in my use case this is not possible, so I would like to use a c