Here're the prefix filters shipped with hbase:

$ ls hbase-client/src/main/java/org/apache/hadoop/hbase/filter | grep -i
prefix
BinaryPrefixComparator.java
ColumnPrefixFilter.java
MultipleColumnPrefixFilter.java
PrefixFilter.java

PrefixFilter is close to what you described:

 * Pass results that have same row prefix.

PrefixFilter relies on start row being correctly set.

You can take a look at its implementation. Once row prefix is passed,
filterAllRemaining() would return true - skipping the remaining rows.

Cheers


On Fri, Jun 27, 2014 at 7:06 PM, Intae Kim <[email protected]> wrote:

> Thank you for answering.
>
> I just wonder which algorithm is used to find prefix row.
>
> If I use rowprefix filter, how good performance it is.
>
> I think It is better than sequential search. But I want know how to work in
> details.
> 2014. 6. 28. 오전 9:57에 "Ted Yu" <[email protected]>님이 작성:
>
> > By 'row prefix scan', did you mean that you use PrefixFilter ?
> >
> > The scan should always set start and stop rows, if known.
> > PrefixFilter would not automatically set start row.
> >
> > Cheers
> >
> > On Fri, Jun 27, 2014 at 5:47 PM, Intae Kim <[email protected]> wrote:
> >
> > > When I use row prefix scan, how hbase find start row internally?
> > >
> > > is it finding start row using binary search?
> > >
> > > plz, anyone know that?
> > >
> > > thanks
> > >
> >
>

Reply via email to