Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 41184 invoked from network); 8 Jun 2010 22:44:17 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Jun 2010 22:44:17 -0000 Received: (qmail 62806 invoked by uid 500); 8 Jun 2010 22:44:15 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 62779 invoked by uid 500); 8 Jun 2010 22:44:15 -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 62770 invoked by uid 99); 8 Jun 2010 22:44:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jun 2010 22:44:15 +0000 X-ASF-Spam-Status: No, hits=0.3 required=10.0 tests=AWL,DATE_IN_PAST_12_24,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jbellis@gmail.com designates 74.125.82.172 as permitted sender) Received: from [74.125.82.172] (HELO mail-wy0-f172.google.com) (74.125.82.172) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jun 2010 22:44:11 +0000 Received: by wyb32 with SMTP id 32so1194842wyb.31 for ; Tue, 08 Jun 2010 15:43:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=6R1lp+uByaBhLPYID6h9Z60xmzyZNllVKGDB85MY/qw=; b=qhapfm7xQUIqgI+dsBTK78mnm0f50RncNxjS3WnrN9mlZN5m4EHnd5rF+d9RzY0G/m IiRK3n+6a3pu5gm27bLuhK3wx0u8zxBEG/+8h4TrN3jVfGCwkpsqJTnCdY78m1MJCLKJ FmnG28nBzQjt09JknPuD1JsUdfBvtr9f1nGRM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=JDxnWSgq5eA2nk1utoiWmq1hP9sDQBXlGXOHhI5281FRM6bFnYhGmaP0BguQosXsyR nmVyhznLrP0dLDHo4oEoEXmCzfe2ADg3wFNL4CKiSUfIgMyVjFczhM8cP+qbwRNE25QS F7AYiHt/GeBxe6jwpKhzMe0xatGK5RDgTRgGI= Received: by 10.216.187.204 with SMTP id y54mr4187963wem.1.1276037029701; Tue, 08 Jun 2010 15:43:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.17.197 with HTTP; Mon, 7 Jun 2010 21:41:53 -0700 (PDT) In-Reply-To: References: From: Jonathan Ellis Date: Mon, 7 Jun 2010 21:41:53 -0700 Message-ID: Subject: Re: Getting keys in a range sorted with respect to last access time To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Mon, Jun 7, 2010 at 9:04 AM, Utku Can Top=E7u wrote: > Hey All, > > First of all I'll start with some questions on the default behavior of > get_range_slices method defined in the thrift API. > > Given a keyrange with start-key "kstart" and end-key "kend", assuming > kstart * Is it true that I'll get the range [kstart,kend) (kstart inclusive, ken= d > exclusive)? [start, end] > * What's the default order of the rows in the result list? (assuming I am > using an OPP) lexically by unicode code point > * (How) can we reverse the sorting order? write your own ReversedOPP. but maybe you mean "how do we scan in reversed order," in which case the answer is, "extend ColumnFamilyStore.getRangeRows" (not for the faint of heart, but not impossible). > * What would be the behavior in the case kstart>kend? Will I get an empty > result list? pretty sure it will error out. easy to verify experimentally. > Secondly, I have use case where I need to access the latest updated rows? > How can this be possible? Writing a new partitioner? No. You'd want to maintain a separate row containing the most recent updat= es. --=20 Jonathan Ellis Project Chair, Apache Cassandra co-founder of Riptano, the source for professional Cassandra support http://riptano.com