hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anil gupta <anilgupt...@gmail.com>
Subject Re: Strange PrefixFilter behaviour on HBase 0.98.6-cdh5.2.0 OutOfOrderScannerNextException
Date Mon, 06 Apr 2015 21:34:34 GMT
Hi Serega,

Yes, you need to set start row when using Prefix filter.

Another smart trick for prefix filter:
Set the prefix as start-row of scan and set the next byteorder
successor(next bigger byte array with same number of bytes) as stop row of
your scan.
For example(using chars for simplicity): if Prefix= abc, then startRow will
be: abc and stopRow:abd

I have been using this trick for prefix based on alphanumeric string for
many years.

Thanks,
Anil Gupta

On Mon, Apr 6, 2015 at 2:18 PM, Serega Sheypak <serega.sheypak@gmail.com>
wrote:

> >Yes, scan goes through entire table unless start row is set.
>
> > does this explain the error though?
>
> > Prefix filter should work even with scan beginning from 1st record, no?
> It would only take longer.
>
>
> Yes, it's explains. My table has 70M rows, and prefix filter should scan
> just for 10 starting from exact place, it takes millis to get response.
>
> 2015-04-06 22:54 GMT+02:00 Serega Sheypak <serega.sheypak@gmail.com>:
>
> > I forgot to set firstRow for Scanner. Looks like HBase tried to scan the
> > whole table. Value from FilterPrefix wasn't used. I supposed that  prefix
> > value could be pushed to scanner as a starting point, but not.
> >
> > 2015-04-06 18:45 GMT+02:00 Imants Cekusins <imantc@gmail.com>:
> >
> >> may this be related:
> >>
> >> https://issues.apache.org/jira/browse/HBASE-11295
> >>
> >> ?
> >>
> >
> >
> >
>



-- 
Thanks & Regards,
Anil Gupta

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