Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # user >> Multiple filterlist


Copy link to this message
-
Re: Multiple filterlist
You can add a filter list to a filter list.

                FilterList fl=new FilterList();
                FilterList fl1=new FilterList();
                fl1.addFilter(fl);
On Wed, May 2, 2012 at 7:27 PM, Davis <[EMAIL PROTECTED]> wrote:

> Guys i understand this... But my question i want to add multiple
> filterlists...
> Something like this
>
> FilterList list1 = new FilterList(FilterList.Operator.MUST_PASS_ONE);
> SingleColumnValueFilter filter1 = new SingleColumnValueFilter(
>        cf,
>        column,
>        CompareOp.EQUAL,
>        Bytes.toBytes("my value")
>        );
> list.add(filter1);
>
> FilterList list2 = new FilterList(FilterList.Operator.MUST_PASS_ONE);
> SingleColumnValueFilter filter2 = new SingleColumnValueFilter(
>        cf,
>        column,
>        CompareOp.EQUAL,
>        Bytes.toBytes("my value")
>        );
> list.add(filter2);
>
> scan.setFilter(list1);
> scan.setFilter(list2);
>
>
--

Shashwat Shriparv