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/01/04 12:44:40 UTC

issue in fuzzy filter

Hi,

 We can use fuzzy row filter when rowkey has fixed length.I decided to
design row key as yyyy-mm-dd| platform id | control id where platform id
and control id are a two digit nos.
we have combo box through which we can select differen values of date,
platform and control for search. For this we decided to use fuzzy filter.
So now actions can be performed by yyyy-mm-dd|??|?? and so on.

  Now i am trying to use fuzzy row filter in java api and i tried below
code but it throws error.


        Configuration config = HBaseConfiguration.create();


        HTable hTable = new HTable(config, "test");

        Scan scan = new Scan();

        scan.setFilter(new FuzzyRowFilter(
                Arrays.asList(
                        new Pair<byte[], byte[]>(

Bytes.toBytesBinary("\\x00\\x00\\x00\\x00_login_"),
                                new byte[]{1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
0}))));
    }


I have added all the dependency jars but still it throws Create constructor
" FuzzyRowFilter(java.util.list) " and i am using hbase version 0.98.13

Can any one help me in solving this?


Thanks

Re: issue in fuzzy filter

Posted by Rajeshkumar J <ra...@gmail.com>.
Hi Ted,

   I have solved this issue as this is due to illegal class name.

Thanks

On Mon, Jan 4, 2016 at 7:35 PM, Ted Yu <yu...@gmail.com> wrote:

> Can you pastebin the complete error you encountered ?
> What dependencies have you added ?
>
> Thanks
>
> > On Jan 4, 2016, at 3:44 AM, Rajeshkumar J <ra...@gmail.com>
> wrote:
> >
> > Hi,
> >
> > We can use fuzzy row filter when rowkey has fixed length.I decided to
> > design row key as yyyy-mm-dd| platform id | control id where platform id
> > and control id are a two digit nos.
> > we have combo box through which we can select differen values of date,
> > platform and control for search. For this we decided to use fuzzy filter.
> > So now actions can be performed by yyyy-mm-dd|??|?? and so on.
> >
> >  Now i am trying to use fuzzy row filter in java api and i tried below
> > code but it throws error.
> >
> >
> >        Configuration config = HBaseConfiguration.create();
> >
> >
> >        HTable hTable = new HTable(config, "test");
> >
> >        Scan scan = new Scan();
> >
> >        scan.setFilter(new FuzzyRowFilter(
> >                Arrays.asList(
> >                        new Pair<byte[], byte[]>(
> >
> > Bytes.toBytesBinary("\\x00\\x00\\x00\\x00_login_"),
> >                                new byte[]{1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
> > 0}))));
> >    }
> >
> >
> > I have added all the dependency jars but still it throws Create
> constructor
> > " FuzzyRowFilter(java.util.list) " and i am using hbase version 0.98.13
> >
> > Can any one help me in solving this?
> >
> >
> > Thanks
>

Re: issue in fuzzy filter

Posted by Ted Yu <yu...@gmail.com>.
Can you pastebin the complete error you encountered ?
What dependencies have you added ?

Thanks

> On Jan 4, 2016, at 3:44 AM, Rajeshkumar J <ra...@gmail.com> wrote:
> 
> Hi,
> 
> We can use fuzzy row filter when rowkey has fixed length.I decided to
> design row key as yyyy-mm-dd| platform id | control id where platform id
> and control id are a two digit nos.
> we have combo box through which we can select differen values of date,
> platform and control for search. For this we decided to use fuzzy filter.
> So now actions can be performed by yyyy-mm-dd|??|?? and so on.
> 
>  Now i am trying to use fuzzy row filter in java api and i tried below
> code but it throws error.
> 
> 
>        Configuration config = HBaseConfiguration.create();
> 
> 
>        HTable hTable = new HTable(config, "test");
> 
>        Scan scan = new Scan();
> 
>        scan.setFilter(new FuzzyRowFilter(
>                Arrays.asList(
>                        new Pair<byte[], byte[]>(
> 
> Bytes.toBytesBinary("\\x00\\x00\\x00\\x00_login_"),
>                                new byte[]{1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
> 0}))));
>    }
> 
> 
> I have added all the dependency jars but still it throws Create constructor
> " FuzzyRowFilter(java.util.list) " and i am using hbase version 0.98.13
> 
> Can any one help me in solving this?
> 
> 
> Thanks