cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brandon Williams <dri...@gmail.com>
Subject Re: Sorted Integer -> UUID
Date Fri, 03 Dec 2010 04:25:39 GMT
On Wed, Dec 1, 2010 at 8:33 AM, Benjamin Waldher <lgbr@laserbunny.net>wrote:

> How can I have a sorted set of rows of Integer -> UUID where the integer
> may exist many times?
>

If you need to repeat an integer as a column name, add entropy and use a
BytesType column.  Pack your integer in big endian format, and append
another random packed integer.  When you slice the columns, only unpack the
first 8 bytes.  You still get the desired sorting this way, though on
repeats it will sort by the random portion.

-Brandon

Mime
View raw message