You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by 梁景明 <fu...@gmail.com> on 2011/05/25 04:56:12 UTC

Re: SingleColumnValueFilter

FilterList list = new FilterList(FilterList.Operator.MUST_PASS_ALL, fs);

u can define a list like this

在 2011年5月25日 上午10:39, <hm...@tsmc.com>写道:

>
>
> Hi there,
>
> Can I set multiple SingleColumnValueFilter for a qualifier like following
> sample codes?
> The scan result is nothing, so I think whether the filters can combine
> these filter with "OR" instead of " AND".
> Any ideas?
>
>
>
> //=======================================================================================
>     Scan s = new Scan();
>      FilterList fl = new FilterList();
>     SingleColumnValueFilter scv1 = new SingleColumnValueFilter
> (Bytes.toBytes("cf"),
>                    Bytes.toBytes("q1"),
>                    CompareFilter.CompareOp.EQUAL,
>                    new RegexStringComparator("^AA")) ;
>
>      SingleColumnValueFilter scv2 = new SingleColumnValueFilter
> (Bytes.toBytes("cf"),
>                    Bytes.toBytes("q1"),
>                    CompareFilter.CompareOp.EQUAL,
>                    new RegexStringComparator("^BB")) ;
>
>      SingleColumnValueFilter scv3 = new SingleColumnValueFilter
> (Bytes.toBytes("cf"),
>                    Bytes.toBytes("q1"),
>                    CompareFilter.CompareOp.EQUAL,
>                    new RegexStringComparator("^CC")) ;
>
>     fl.addFilter(scv1);
>     fl.addFilter(scv2);
>     fl.addFilter(scv3);
>    s.setFilter(fl);
>
>
> Fleming Chiu(邱宏明)
> Ext: 707-2260
> Be Veg, Go Green, Save the Planet!
>
>  ---------------------------------------------------------------------------
>                                                         TSMC PROPERTY
>  This email communication (and any attachments) is proprietary information
>  for the sole use of its
>  intended recipient. Any unauthorized review, use or distribution by anyone
>  other than the intended
>  recipient is strictly prohibited.  If you are not the intended recipient,
>  please notify the sender by
>  replying to this email, and then delete this email and any copies of it
>  immediately. Thank you.
>
>  ---------------------------------------------------------------------------
>
>
>
>