You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Rajeshkumar J <ra...@gmail.com> on 2016/02/01 04:50:03 UTC

Fuzzy Row filter with ranges

Hi,

  Can any one guide me details regarding how to implement fuzzy row filter
with ranges in hbase using java api


Thanks

Re: Fuzzy Row filter with ranges

Posted by Jameson Li <ho...@gmail.com>.
2016-02-05 23:25 GMT+08:00 Jean-Marc Spaggiari <je...@spaggiari.org>:

> Consider


Yes, You are right.
We should consider the real range for the rowkey, just a thinking way to
struct the start and end, I am sorry somebody misguided by me.



-- 


Thanks & Regards,
李剑 Jameson Li
Focus on Hadoop,Mysql

Re: Fuzzy Row filter with ranges

Posted by Ted Yu <yu...@gmail.com>.
In this case, it seems stop key should be 0xAB.

Rajeshkumar's email didn't mention prefix.
I assume he was looking for generic fuzzy row filter.

Cheers

On Fri, Feb 5, 2016 at 7:25 AM, Jean-Marc Spaggiari <jean-marc@spaggiari.org
> wrote:

> Hi,
>
> Be careful with you stop key here,  you might miss some values.
>
> Consider prefix 0xAA.
>
> Start=0xAA
> Stop=0xAA 0xFF
>
> You will miss 0xAA 0xFF 0xFF which is still a valid option.
>
> JMS
> Le 2016-02-05 3:21 AM, "Jameson Li" <ho...@gmail.com> a écrit :
>
> > 2016-02-01 19:08 GMT+08:00 Jean-Marc Spaggiari <jean-marc@spaggiari.org
> >:
> >
> > > example of what you are trying to d
> >
> >
> > like query prefixKey%, you can struct a query like this
> > startRow=Bytes.toBytes(prefixKey) ,
> > stopRow=Bytes.add(prefixKey, new byte[]{(byte)0xff})
> >
> > And be remember set setCacheBlocks(false), if the query will not query
> > repeat.
> >
> > And remember let a certain start and end, even if as a
> PrefixScan(sometimes
> > just write start but not end, it maybe scan the whole bottom half of the
> > table), and let the section smaller with query more faster.
> >
> >
> > --
> >
> >
> > Thanks & Regards,
> > 李剑 Jameson Li
> > Focus on Hadoop,Mysql
> >
>

Re: Fuzzy Row filter with ranges

Posted by Jean-Marc Spaggiari <je...@spaggiari.org>.
Hi,

Be careful with you stop key here,  you might miss some values.

Consider prefix 0xAA.

Start=0xAA
Stop=0xAA 0xFF

You will miss 0xAA 0xFF 0xFF which is still a valid option.

JMS
Le 2016-02-05 3:21 AM, "Jameson Li" <ho...@gmail.com> a écrit :

> 2016-02-01 19:08 GMT+08:00 Jean-Marc Spaggiari <je...@spaggiari.org>:
>
> > example of what you are trying to d
>
>
> like query prefixKey%, you can struct a query like this
> startRow=Bytes.toBytes(prefixKey) ,
> stopRow=Bytes.add(prefixKey, new byte[]{(byte)0xff})
>
> And be remember set setCacheBlocks(false), if the query will not query
> repeat.
>
> And remember let a certain start and end, even if as a PrefixScan(sometimes
> just write start but not end, it maybe scan the whole bottom half of the
> table), and let the section smaller with query more faster.
>
>
> --
>
>
> Thanks & Regards,
> 李剑 Jameson Li
> Focus on Hadoop,Mysql
>

Re: Fuzzy Row filter with ranges

Posted by Jameson Li <ho...@gmail.com>.
2016-02-01 19:08 GMT+08:00 Jean-Marc Spaggiari <je...@spaggiari.org>:

> example of what you are trying to d


like query prefixKey%, you can struct a query like this
startRow=Bytes.toBytes(prefixKey) ,
stopRow=Bytes.add(prefixKey, new byte[]{(byte)0xff})

And be remember set setCacheBlocks(false), if the query will not query
repeat.

And remember let a certain start and end, even if as a PrefixScan(sometimes
just write start but not end, it maybe scan the whole bottom half of the
table), and let the section smaller with query more faster.


-- 


Thanks & Regards,
李剑 Jameson Li
Focus on Hadoop,Mysql

Re: Fuzzy Row filter with ranges

Posted by Jean-Marc Spaggiari <je...@spaggiari.org>.
Can't you not just add start row and stop row to you scan? Can you provide
an example of what you are trying to do?

JMS

2016-02-01 0:11 GMT-05:00 hongbin ma <ma...@apache.org>:

> i suggest you reading the current implementation of fuzzy row filter, and
> modify it according to your requirement, it should be easy
>
> On Mon, Feb 1, 2016 at 11:50 AM, Rajeshkumar J <
> rajeshkumarit8292@gmail.com>
> wrote:
>
> > Hi,
> >
> >   Can any one guide me details regarding how to implement fuzzy row
> filter
> > with ranges in hbase using java api
> >
> >
> > Thanks
> >
>
>
>
> --
> Regards,
>
> *Bin Mahone | 马洪宾*
> Apache Kylin: http://kylin.io
> Github: https://github.com/binmahone
>

Re: Fuzzy Row filter with ranges

Posted by hongbin ma <ma...@apache.org>.
i suggest you reading the current implementation of fuzzy row filter, and
modify it according to your requirement, it should be easy

On Mon, Feb 1, 2016 at 11:50 AM, Rajeshkumar J <ra...@gmail.com>
wrote:

> Hi,
>
>   Can any one guide me details regarding how to implement fuzzy row filter
> with ranges in hbase using java api
>
>
> Thanks
>



-- 
Regards,

*Bin Mahone | 马洪宾*
Apache Kylin: http://kylin.io
Github: https://github.com/binmahone