Yes through FilterList
FilterList filterList = new FilterList(FilterList.Operator.MUST_PASS_ONE);
for(String rowid : rowIds){
rowFilter = new RowFilter(CompareFilter.CompareOp.EQUAL, new
BinaryComparator(Bytes.toBytes(rowid)));
filterList.addFilter(rowFilter);
filter = new QualifierFilter(CompareFilter.CompareOp.EQUAL, new
BinaryComparator(Bytes.toBytes(qualifier)) );
filterList.addFilter(filter);
scan.setFilter(filterList);
ResultScanner results = table.getScanner(scan);
for(Result result : results){
List<Cell> cells = result.listCells();
For what I can see its not limiting to the rowids I have passed and
returning columns that was not passed in the Qualifierfilter.
Thanks,
Prahalad
On Fri, Jan 13, 2017 at 8:33 PM, Ted Yu <[email protected]> wrote:
> Can you illustrate how the two filters were combined (I assume through
> FilterList) ?
>
> I think the order of applying the filters should be RowFilter followed by
> QualifierFilter.
>
> Cheers
>
> On Fri, Jan 13, 2017 at 6:55 AM, Prahalad kothwal <[email protected]>
> wrote:
>
> > Hi ,
> >
> > Can I pass both RowFilter and QualifierFilter and expect HBase to filter
> on
> > both rowkey and Qualifier ?
> >
> > I tried applying both filters but I am not getting accurate results.
> >
> >
> > Any help is appreciated .
> >
> > Thanks,
> > Prahalad
> >
>