Unless I misunderstand the Q, composing the column names with the row
keys and merging the resulting would yield something useful.

keyA => (1, uuid), (2, uuid), (3, uid)
keyB => (1, uuid), (2, uuid), (3, uid)

Should be transformed into:

 (1, keyA, uuid),
 (1, keyB, uuid),
 (2, keyA, uuid),
 (2, keyB, uuid),
 (3, keyA, uuid),
 (3, keyB, uuid)

map + merge to the rescue.

On Wed, Dec 1, 2010 at 3:33 PM, Benjamin Waldher <l...@laserbunny.net> wrote:
> I have a fairly simple problem that might require a complicated solution.
>
> I need to store Integer -> UUID in a column family, and be able to query
> (and then paginate) the rows ordered by the integer in descending order.
> This is simple enough if no two rows have the same integer, as the integer
> could be a column name which can easily be sorted. However, in my scenario,
> two rows may have the same Integer value. As such, I would need to use the
> integer as the key in the column family. However, this means I must use
> OrderPreservingPartitioner, which is going to cause a huge load imbalance on
> one of my nodes.
>
> How can I have a sorted set of rows of Integer -> UUID where the integer may
> exist many times?
>

Reply via email to