hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Daniel Cryans" <jdcry...@gmail.com>
Subject Re: backward scanner or other ways to do pagination
Date Wed, 23 Jul 2008 19:43:55 GMT
Pavel,

You could reverse the keys instead of reversing the scanner. Something
"Long.MAX_VALUE - timestamp" and padded with zeros just in case.

Hope it helps,

J-D

On Wed, Jul 23, 2008 at 3:30 PM, Pavel Lysov <pavlikus@gmail.com> wrote:

> Hi guys!
>
> It seems I'll need to be able to paginate over table contents. I'll need to
> get items starting from most recent and going past. Is there a good way to
> achieve that? Since the keys are sorted (I use timestamps as keys in the
> table), I thought about some kind of reverse scanner that would cycle
> through the items 999 to 111 - that would help with the pagination
> requirement. Though I see nothing like that in the hbase sources.
>
> Could you please advice how to paginate? :)
>
> Thank you!
>
> Pavel Lysov
> pavlikus@gmail.com
>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message