I looked at git log for MultipleColumnPrefixFilter - there has been no more fix since 1.2.0
Can you reproduce what you observed using a unit test ? It would be easier to understand the scenario through unit test. Cheers On Thu, Mar 1, 2018 at 9:57 PM, Vikash Agarwal <[email protected]> wrote: > Hi Team, > > > Currently I am trying to use MultipleColumnPrefixFilter along with > SingleColumnValueFilter and the results that I am getting seems to be > problematic. > > I have an hbase table "test_messages" with column family "main" and Column > Qualifiers as : "pa", "cs" ,"eps","cst","ver","nm","parl". > Assume all the row Keys of the table has all the above columns. > > > Now When I am creating Filters as below: > > FilterList temp=new FilterList(FilterList.Operator.MUST_PASS_ALL); > > SingleColumnValueFilter filter1= new SingleColumnValueFilter("main" > ,"pa",CompareFilter.CompareOp.LESS_OR_EQUAL, Bytes.toBytes("SomeValue")); > filter1 .setFilterIfMissing(true); > > SingleColumnValueFilter filter2= new SingleColumnValueFilter("main" > ,"cs",CompareFilter.CompareOp.EQUAL, Bytes.toBytes("SomeValue")); > filter2.setFilterIfMissing(true); > > > SingleColumnValueFilter filter3= new SingleColumnValueFilter("main" > ,eps",CompareFilter.CompareOp.EQUAL, Bytes.toBytes("SomeValue")); > filter3.setFilterIfMissing(true); > > temp.addFilter(filter1); > > temp.addFilter(filter2); > > temp.addFilter(filter3); > > Case 1: > > MultipleColumnPrefixFilter cpfxf=new MultipleColumnPrefixFilter(new > byte[][]{ Bytes.toBytes("pa"),Bytes.toBytes("cs"),Bytes.toBytes("eps")}); > temp.addFilter(cpfxf); The above filters results in proper extratcion of > data from Hbase. Now if I create a MultipleColumnPrefixFilter as below: > Case 2: > Consider we have filter1,2,3 and below filter > > MultipleColumnPrefixFilter cpfxf=new MultipleColumnPrefixFilter(new > byte[][]{ Bytes.toBytes("pa"),Bytes.toBytes("eps")}); //Note "cs" is > removed temp.addFilter(cpfxf); I don't get any data However if I create a > filter as Case 3: > > Consider we have filter1,2,3 and below filter > > MultipleColumnPrefixFilter cpfxf=new MultipleColumnPrefixFilter(new > byte[][]{ Bytes.toBytes("pa"),Bytes.toBytes("cs")}); // Note "eps" is > removed and "cs" is added back. temp.addFilter(cpfxf); I get lot of data. > EIther both Case 2 and Case 3 should give data or none of them. Can someone > Explain me the reason for this to happen ? Or is there a bug in > MultipleColumnPrefixFilter . > > Hbase Version: 1.2.0 > > > > -- > Vikash Agarwal >
