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

Joep Rottinghuis commented on HBASE-6142:
-----------------------------------------

Another example that requires a double-take after initial first reading:
WhileMatchFilter:
{code}
/**
 * A wrapper filter that returns true from {@link #filterAllRemaining()} as soon
 * as the wrapped filters {@link Filter#filterRowKey(byte[], int, int)},
 * {@link Filter#filterKeyValue(org.apache.hadoop.hbase.KeyValue)},
 * {@link org.apache.hadoop.hbase.filter.Filter#filterRow()} or
 * {@link org.apache.hadoop.hbase.filter.Filter#filterAllRemaining()} methods
 * returns true.
 */
{code}
Huh? A Filter that returns true... meaning that values will be filtered out not 
pass the filter.
Seems like the point is to stop the scan after a certain condition is met for 
efficiency, but it is not immediately obvious how multiple filters interact 
when wrapped by WhileMatchFilter.
                
> Javadoc in some Filters ambiguous
> ---------------------------------
>
>                 Key: HBASE-6142
>                 URL: https://issues.apache.org/jira/browse/HBASE-6142
>             Project: HBase
>          Issue Type: Bug
>          Components: documentation
>    Affects Versions: 0.92.2, 0.96.0, 0.94.1
>            Reporter: Joep Rottinghuis
>            Priority: Minor
>
> The javadoc on some of the filter is somewhat confusing.
> The main Filter interface has methods that behave like a sieve; when 
> filterRowKey returns true, that means that the row is filtered _out_ (not 
> included).
> Many of the Filter implementations work the other way around. When the 
> condition is met the value passes (ie, the row is returned).
> Most Filters make it clear when a values passes (passing through the filter 
> meaning the values are returned from the scan).
> Some are less clear in light of how the Filter interface works: 
> WhileMatchFilter and SingleColumnValueFilter are examples.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to