You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Bjorn Olsen (JIRA)" <ji...@apache.org> on 2016/08/04 12:39:20 UTC

[jira] [Updated] (HBASE-16356) REST API scanner: prefixFilter and custom filters are mutually exclusive

     [ https://issues.apache.org/jira/browse/HBASE-16356?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bjorn Olsen updated HBASE-16356:
--------------------------------
    Summary: REST API scanner: prefixFilter and custom filters are mutually exclusive  (was: REST API prefixFilter and custom filters are mutually exclusive)

> REST API scanner: prefixFilter and custom filters are mutually exclusive
> ------------------------------------------------------------------------
>
>                 Key: HBASE-16356
>                 URL: https://issues.apache.org/jira/browse/HBASE-16356
>             Project: HBase
>          Issue Type: Bug
>          Components: REST
>    Affects Versions: 1.1.2
>         Environment: Not environment-specific, but visible in HDP 2.4.2
>            Reporter: Bjorn Olsen
>            Priority: Minor
>
> A user can optionally specify a row PrefixFilter, or a list of custom filters on the REST API.
> Prefix filter example: 
> <API>/123*?startrow=0&endrow=9
> Custom filters example: 
> <API>/*?startrow=0&endrow=9&filter=RowFilter(=,'substring:456)
> This works when specified separately, like above. 
> However, specifying both a prefix filter and a list of custom filters causes the API to ignore the prefix filter.
> Example using both parameters:
> <API>/123*?startrow=0&endrow=9&filter=RowFilter(=,'substring:456)
> It appears that code in the TableResource.getScanResource function is causing this issue as follows:
> if (filterList != null) {
>   tableScan.setFilter(filterList);
> } else if (filter != null) {
>   tableScan.setFilter(filter);
> }
> (see https://hbase.apache.org/devapidocs/src-html/org/apache/hadoop/hbase/rest/TableResource.html#line.196 )
> This should probably be changed to use a single filterList for both parameters. The prefix filter can be "Popped" onto the filter list and then these parameters will work even when both are specified.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)