Return-Path: Delivered-To: apmail-hbase-user-archive@www.apache.org Received: (qmail 53484 invoked from network); 25 Jun 2010 19:01:16 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 Jun 2010 19:01:16 -0000 Received: (qmail 2984 invoked by uid 500); 25 Jun 2010 19:01:15 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 2945 invoked by uid 500); 25 Jun 2010 19:01:14 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 2937 invoked by uid 99); 25 Jun 2010 19:01:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jun 2010 19:01:14 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of octo47@gmail.com designates 74.125.82.41 as permitted sender) Received: from [74.125.82.41] (HELO mail-ww0-f41.google.com) (74.125.82.41) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jun 2010 19:01:07 +0000 Received: by wwf26 with SMTP id 26so1422990wwf.14 for ; Fri, 25 Jun 2010 12:00:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=JwQE/UTe74/iiX7Waj4R+D02UA50h2EC5CgFwG27dWA=; b=oQWAyr2j5NM6V3feTAIFMTtlHBut8OCXQ8t6hQE+J5OfEhYXZ1ii4fEZe9gK4gq8yq 5qlWmoPjKuDsZSfq3CpqjpbM+cX+Nf49qFuoQ1A9oQzk0l4wWWcE4Y8MmCLkgHs2251g /KUkSy7BD2nZ04q07hRDy+pJI3x5QxrKlBets= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=K5rMyzKzSs+LXIzXlh/AHFVlYrqDEyH0ATC2t2Wi+HdQ+U73krCOxHqt/vjHImrzXm AFjV8TIzlz+7qh3CrCTrnUwPczNcyNbVX2/l0FXo6ww0ocp5lGvSX8V6fV2zya6S2Byl T5i2juc19F1823XL0oqjOqTxY1lBgDvKmats0= MIME-Version: 1.0 Received: by 10.216.90.76 with SMTP id d54mr5416953wef.83.1277492446579; Fri, 25 Jun 2010 12:00:46 -0700 (PDT) Received: by 10.216.234.100 with HTTP; Fri, 25 Jun 2010 12:00:46 -0700 (PDT) In-Reply-To: References: Date: Fri, 25 Jun 2010 23:00:46 +0400 Message-ID: Subject: Re: descending keys From: Andrey Stepachev To: user@hbase.apache.org Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org use Long.MAX - incrementColumnValue() as qualifier 2010/6/25 N Kapshoo : > I have a 'long' number that I get by using > HTable.'incrementColumnValue'. This long is used as the qualifier id > on a columnFamily. > > However in my listings, I always want the latest number first > (descending order basically). > > Currently I call the NavigableMap.descendingKeySet after I do the 'Get'. > > Is this the optimal way of doing it? Can I do something that can be > faster? Especially if I start filtering out and getting only first > 1000 etc then this wont work. > > How should I go about this? Change the key or is there something else > I can do while creating the table, doing a Get etc? > > Thanks. >