[ 
https://issues.apache.org/jira/browse/HBASE-10485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13895682#comment-13895682
 ] 

Lars Hofhansl commented on HBASE-10485:
---------------------------------------

Looks. All filters need to consistent between filterRow, filterRowKey, and 
filterKeyValue, or the results are undefined.
I'd probably write it as:
{code}
  return (filterRowKey(v.getBuffer(), v.getRowOffset(), v.getRowLength())) ? 
ReturnCode.SKIP : ReturnCode.INCLUDE;
{code}
(But that's just a nit)

> PrefixFilter#filterKeyValue() should perform filtering on row key
> -----------------------------------------------------------------
>
>                 Key: HBASE-10485
>                 URL: https://issues.apache.org/jira/browse/HBASE-10485
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee: Ted Yu
>         Attachments: 10485-0.94.txt, 10485-v1.txt
>
>
> Niels reported an issue under the thread 'Trouble writing custom filter for 
> use in FilterList' where his custom filter used in FilterList along with 
> PrefixFilter produced an unexpected results.
> His test can be found here:
> https://github.com/nielsbasjes/HBase-filter-problem
> This is due to PrefixFilter#filterKeyValue() using 
> FilterBase#filterKeyValue() which returns ReturnCode.INCLUDE
> When FilterList.Operator.MUST_PASS_ONE is specified, 
> FilterList#filterKeyValue() would return ReturnCode.INCLUDE even when row key 
> prefix doesn't match meanwhile the other filter's filterKeyValue() returns 
> ReturnCode.NEXT_COL



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to