Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

HBase - Use of FilterList MUST_PASS_ALL

avatar
New Member

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

avatar
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

avatar
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

avatar
New Member

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.