hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prahalad kothwal <kothwal...@gmail.com>
Subject Re: FilterList passing RowFilter and QualifierFilter
Date Fri, 13 Jan 2017 18:02:22 GMT
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 <yuzhihong@gmail.com> 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 <kothwaldev@gmail.com>
> 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
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message