Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

HBase - Use of FilterList MUST_PASS_ALL

Solved Go to solution
Highlighted

HBase - Use of FilterList MUST_PASS_ALL

New Contributor

Hi,

Can someone clear up how the Filter List works in HBase. My thinking was all filters much pass for the row to return, for example:

{"type":"FilterList","op":"MUST_PASS_ALL","filters":[ {"type":"SingleColumnValueFilter","op":"EQUAL","family":"ACTY","qualifier":"ACCT_ID","latestVersion":true,"comparator":{"type":"BinaryComparator","value":"C000123"}}, {"type":"SingleColumnValueFilter","op":"EQUAL","family":"ACTY","qualifier":"IP_ID","latestVersion":true,"comparator":{"type":"BinaryComparator","value":"100"}}, {"type":"SingleColumnValueFilter","op":"EQUAL","family":"ACTY","qualifier":"OFF_ID","latestVersion":true,"comparator":{"type":"BinaryComparator","value":"V00"}}, {"type":"SingleColumnValueFilter","op":"EQUAL","family":"ACTY","qualifier":"IBD_ID","latestVersion":true,"comparator":{"type":"BinaryComparator","value":"C01"}} ] }

However, in the above example, it is returning data that matches the first Value (ACCT_ID) and ignore the other constraints. What am I missing about how the query is constructed, how am I using MUST_PASS_ALL wrong?

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: HBase - Use of FilterList MUST_PASS_ALL

Super Guru
@Stephen knott

Are filter columns part of scan? If filter columns are not part of scan then filters are ignored. Check the following link:

https://issues.apache.org/jira/browse/HBASE-4364

View solution in original post

2 REPLIES 2
Highlighted

Re: HBase - Use of FilterList MUST_PASS_ALL

Super Guru
@Stephen knott

Are filter columns part of scan? If filter columns are not part of scan then filters are ignored. Check the following link:

https://issues.apache.org/jira/browse/HBASE-4364

View solution in original post

Re: HBase - Use of FilterList MUST_PASS_ALL

New Contributor

Thank you.

You are correct, I wasn't populating the Scanner object with columns, add them in:

<Scanner><column>mycolumn</column><column>mycolumn2</column><filter>...

and it works. Thanks.

Don't have an account?
Coming from Hortonworks? Activate your account here