You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Imran M Yousuf <im...@gmail.com> on 2010/10/19 08:10:39 UTC

Getting latest row first

Hi,

I am doing a scan using the Java Client API and noticed that HBase
scans from oldest row to latest, is there any configuration for asking
HBase to go the opposite direction - i.e. latest to oldest? I checked
in Scan API and Filter extensions but could not find any :-(.

Thank you,

-- 
Imran M Yousuf
Twitter: @imyousuf - http://twitter.com/imyousuf
Blog: http://imyousuf-tech.blogs.smartitengineering.com/
Mobile: +880-1711402557

Re: Getting latest row first

Posted by Imran M Yousuf <im...@gmail.com>.
Hi Ryan,

I figured out that is possible, just wanted to know whether that is
what I have to do :) before actually doing it. Thanks for the
confirmation :).

Regards,

Imran

On Tue, Oct 19, 2010 at 12:13 PM, Ryan Rawson <ry...@gmail.com> wrote:
> no we do not support 'reverse scanning' nor will we in the forseeable
> future.  if your keys are integer you can store them in reverse by
> doing (Integer.MAX_VALUE - value).
>
> On Mon, Oct 18, 2010 at 11:10 PM, Imran M Yousuf <im...@gmail.com> wrote:
>> Hi,
>>
>> I am doing a scan using the Java Client API and noticed that HBase
>> scans from oldest row to latest, is there any configuration for asking
>> HBase to go the opposite direction - i.e. latest to oldest? I checked
>> in Scan API and Filter extensions but could not find any :-(.
>>
>> Thank you,
>>
>> --
>> Imran M Yousuf
>> Twitter: @imyousuf - http://twitter.com/imyousuf
>> Blog: http://imyousuf-tech.blogs.smartitengineering.com/
>> Mobile: +880-1711402557
>>
>



-- 
Imran M Yousuf
Entrepreneur & CEO
Smart IT Engineering Ltd.
Dhaka, Bangladesh
Twitter: @imyousuf - http://twitter.com/imyousuf
Blog: http://imyousuf-tech.blogs.smartitengineering.com/
Mobile: +880-1711402557

Re: Getting latest row first

Posted by Ryan Rawson <ry...@gmail.com>.
no we do not support 'reverse scanning' nor will we in the forseeable
future.  if your keys are integer you can store them in reverse by
doing (Integer.MAX_VALUE - value).

On Mon, Oct 18, 2010 at 11:10 PM, Imran M Yousuf <im...@gmail.com> wrote:
> Hi,
>
> I am doing a scan using the Java Client API and noticed that HBase
> scans from oldest row to latest, is there any configuration for asking
> HBase to go the opposite direction - i.e. latest to oldest? I checked
> in Scan API and Filter extensions but could not find any :-(.
>
> Thank you,
>
> --
> Imran M Yousuf
> Twitter: @imyousuf - http://twitter.com/imyousuf
> Blog: http://imyousuf-tech.blogs.smartitengineering.com/
> Mobile: +880-1711402557
>