hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Esteban Gutierrez <este...@cloudera.com>
Subject Re: How to get Last 1000 records from 1 millions records
Date Wed, 24 Aug 2016 19:36:51 GMT
As long as new rows are added to the latest region that "might" work. But
if the table is using hashed keys or rows are added randomly to the table
then retrieving the last million will be trickier and you will have to scan
based on timestamp (if not modified) and then filter one more time.

esteban.


--
Cloudera, Inc.


On Wed, Aug 24, 2016 at 12:31 PM, Ted Yu <yuzhihong@gmail.com> wrote:

> The following API should help in your case:
>
>   public Scan setReversed(boolean reversed) {
>
> Cheers
>
> On Wed, Aug 24, 2016 at 12:05 PM, Manjeet Singh <
> manjeet.chandhok@gmail.com>
> wrote:
>
> > Hi all
> >
> > Hbase didnt provide sorting on column but rowkey store in sorted form
> > like small value first and greater value last
> >
> > example
> > 1
> > 2
> > 3
> > 4
> > 5
> > 6
> > 7
> > and so on
> >
> > Assume I have 1 Miilions record but i want to look last 1000 records only
> > Is their any way to do this? I don't want to perform any calculation on
> > client side so may be any filter can help on it?
> >
> > Thanks
> > Manjeet
> >
> > --
> > luv all
> >
>

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