FilterList list = new FilterList(FilterList.Operator.MUST_PASS_ONE); SingleColumnValueFilter filter1 = new SingleColumnValueFilter( cf, column, CompareOp.EQUAL, Bytes.toBytes("my value") ); list.add(filter1); SingleColumnValueFilter filter2 = new SingleColumnValueFilter( cf, column, CompareOp.EQUAL, Bytes.toBytes("my other value") ); list.add(filter2); scan.setFilter(list);
On Wed, May 2, 2012 at 7:00 PM, Simon Gilliot < simon.gill...@adthink-media.com> wrote: > Hi, > > A FilterList is what you need. > > You can use only once scan.setFilter(), but you can pass it a filterList > which contains numerous filters (and other filterLists)... > > > http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/filter/FilterList.html > > Le mercredi 02 mai 2012 à 13:22 +0000, Davis a écrit : > > Is there a way to add multiple filter list to a scan object. > > ie, > > scan.setFilter(Filterlist1); > > scan.setFilter(Filterlist2); > > scan.setFilter(Filterlist3); > > Where Filterlist1,Filterlist2 are objects of FilterList and it contains > > combination of filters like ColumnPrefixFilter,ValueFilter. > > > > Or in another words.... > > > > I have a combination of ColumnPrefixFilter and ValueFilter in > filterlist1 for > > column one and another combination of ColumnPrefixFilter and ValueFilter > in > > filterlist2 for column two. i want to combine these two and get result > in one > > shot... > > > > Can ny1 help??? > > > > > -- ∞ Shashwat Shriparv