Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 27794 invoked from network); 1 Dec 2010 14:35:42 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Dec 2010 14:35:42 -0000 Received: (qmail 59844 invoked by uid 500); 1 Dec 2010 14:35:40 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 59657 invoked by uid 500); 1 Dec 2010 14:35:40 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 59648 invoked by uid 99); 1 Dec 2010 14:35:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Dec 2010 14:35:40 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [206.63.65.29] (HELO mail1.laserbunny.net) (206.63.65.29) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Dec 2010 14:35:31 +0000 Received: from [10.0.2.190] (c-71-231-213-175.hsd1.wa.comcast.net [71.231.213.175]) by mail1.laserbunny.net (Postfix) with ESMTPSA id 2F9E225A480 for ; Wed, 1 Dec 2010 06:37:08 -0800 (PST) Message-ID: <4CF65CA6.2070301@laserbunny.net> Date: Wed, 01 Dec 2010 06:33:10 -0800 From: Benjamin Waldher User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101028 Lanikai/3.1.6 MIME-Version: 1.0 To: user@cassandra.apache.org Subject: Sorted Integer -> UUID Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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?