You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Balamurugan Rajendran <ba...@gmail.com> on 2009/03/13 08:35:02 UTC
Regarding IndexedTable.getIndexedScanner
Dear
Is it possible to get a Scanner which scans the record in descending order
of a column value using IndexedTable.
Thanks & Regards
R.Bala
Re: Regarding IndexedTable.getIndexedScanner
Posted by Balamurugan Rajendran <ba...@gmail.com>.
Dear Ryan
Thanks for your quick reply. I agree scanner has only next and not prev.
My actual requirement is to fetch the latest N [N = 1000] records, where the
table is indexed with a column which has the the time [long value] at which
the row is created.
Is there any other way to fetch like this.
Thanks & Regards
R.Bala
On Fri, Mar 13, 2009 at 1:10 PM, Ryan Rawson <ry...@gmail.com> wrote:
> Right now the scanner only has 'next' not 'prev'.
>
> So basically 'no'. Try creating an index in the opposite order... you can
> do Integer.MAX_VALUE - value to get a descending order. Dont forget to 0
> pad it too.
>
> Good luck!
> -ryan
>
> On Thu, Mar 12, 2009 at 11:35 PM, Balamurugan Rajendran <
> balamuruganr@gmail.com> wrote:
>
> > Dear
> >
> > Is it possible to get a Scanner which scans the record in descending
> order
> > of a column value using IndexedTable.
> >
> > Thanks & Regards
> > R.Bala
> >
>
Re: Regarding IndexedTable.getIndexedScanner
Posted by Ryan Rawson <ry...@gmail.com>.
Right now the scanner only has 'next' not 'prev'.
So basically 'no'. Try creating an index in the opposite order... you can
do Integer.MAX_VALUE - value to get a descending order. Dont forget to 0
pad it too.
Good luck!
-ryan
On Thu, Mar 12, 2009 at 11:35 PM, Balamurugan Rajendran <
balamuruganr@gmail.com> wrote:
> Dear
>
> Is it possible to get a Scanner which scans the record in descending order
> of a column value using IndexedTable.
>
> Thanks & Regards
> R.Bala
>