You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Varun Sharma <va...@pinterest.com> on 2013/05/15 08:33:50 UTC
Running prefix scans in hbase
Hi,
I was looking at PrefixFilter but going by the implementation - it looks we
scan every row until we hit the prefix instead of seeking to the row with
the required prefix.
I was wondering if there are more efficient alternatives which would do a
real seek rather than scanning all rows. Would setting startRow and stopRow
- effectively seek to startRow and then perform the scan ?
Thanks
Varun
Re: Running prefix scans in hbase
Posted by Stack <st...@duboce.net>.
On Tue, May 14, 2013 at 11:33 PM, Varun Sharma <va...@pinterest.com> wrote:
> Hi,
>
> I was looking at PrefixFilter but going by the implementation - it looks we
> scan every row until we hit the prefix instead of seeking to the row with
> the required prefix.
>
> I was wondering if there are more efficient alternatives which would do a
> real seek rather than scanning all rows. Would setting startRow and stopRow
> - effectively seek to startRow and then perform the scan ?
>
Scanner should start at the specified startrow, and then begin applying the
filter per row (if prefix filter, try a start row that is made of the
filter prefix). If it is doing otherwise, it is broke.
St.Ack
Re: Running prefix scans in hbase
Posted by Varun Sharma <va...@pinterest.com>.
Not after but only before hitting the prefix - I will check the startRow
stuff - I could not find where the seek happens for that...
On Wed, May 15, 2013 at 7:51 AM, Stack <st...@duboce.net> wrote:
> On Tue, May 14, 2013 at 11:33 PM, Varun Sharma <va...@pinterest.com>
> wrote:
>
> > Hi,
> >
> > I was looking at PrefixFilter but going by the implementation - it looks
> we
> > scan every row until we hit the prefix instead of seeking to the row with
> > the required prefix.
> >
> > I was wondering if there are more efficient alternatives which would do a
> > real seek rather than scanning all rows. Would setting startRow and
> stopRow
> > - effectively seek to startRow and then perform the scan ?
> >
>
> Are you saying the prefix filter keeps reading rows even though it has
> passed out the prefix? I'd think it would return true out of
>
> http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/filter/PrefixFilter.html#filterAllRemaining()once
> it had gone past rows with the prefix?
>
> St.Ack
>
Re: Running prefix scans in hbase
Posted by Stack <st...@duboce.net>.
On Tue, May 14, 2013 at 11:33 PM, Varun Sharma <va...@pinterest.com> wrote:
> Hi,
>
> I was looking at PrefixFilter but going by the implementation - it looks we
> scan every row until we hit the prefix instead of seeking to the row with
> the required prefix.
>
> I was wondering if there are more efficient alternatives which would do a
> real seek rather than scanning all rows. Would setting startRow and stopRow
> - effectively seek to startRow and then perform the scan ?
>
Are you saying the prefix filter keeps reading rows even though it has
passed out the prefix? I'd think it would return true out of
http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/filter/PrefixFilter.html#filterAllRemaining()once
it had gone past rows with the prefix?
St.Ack