hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-10965) Automate detection of presence of Filter#filterRow()
Date Wed, 30 Apr 2014 04:47:19 GMT

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

Ted Yu commented on HBASE-10965:

Toward the tail of HBASE-11093, Anoop makes a case that as long as the following code is present
in HRegion, change in HBASE-11093 w.r.t. FilterList#filterRow() cannot be applied:
private boolean filterRow() throws IOException {
  // when hasFilterRow returns true, filter.filterRow() will be called automatically inside
  // filterRowCells(List<Cell> kvs) so we skip that scenario here.
  return filter != null && (!filter.hasFilterRow())
	  && filter.filterRow();
See https://issues.apache.org/jira/browse/HBASE-11093?focusedCommentId=13985149&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13985149

I think goal of this JIRA can be achieved without removing hasFilterRow().
New method for autodetecting presence of hasFilterRow() can be added to FilterBase. We can
rely on this new method in place where hasFilterRow() is currently called in HRegion.
Post 1.0 release, we can remove hasFilterRow().

> Automate detection of presence of Filter#filterRow()
> ----------------------------------------------------
>                 Key: HBASE-10965
>                 URL: https://issues.apache.org/jira/browse/HBASE-10965
>             Project: HBase
>          Issue Type: Task
>          Components: Filters
>            Reporter: Ted Yu
>            Assignee: Ted Yu
>         Attachments: 10965-v1.txt, 10965-v2.txt, 10965-v3.txt, 10965-v4.txt
> There is potential inconsistency between the return value of Filter#hasFilterRow() and
presence of Filter#filterRow().
> Filters may override Filter#filterRow() while leaving return value of Filter#hasFilterRow()
being false (inherited from FilterBase).
> Downside to purely depending on hasFilterRow() telling us whether custom filter overrides
filterRow(List) or filterRow() is that the check below may be rendered ineffective:
> {code}
>           if (nextKv == KV_LIMIT) {
>             if (this.filter != null && filter.hasFilterRow()) {
>               throw new IncompatibleFilterException(
>                 "Filter whose hasFilterRow() returns true is incompatible with scan with
>             }
> {code}
> When user forgets to override hasFilterRow(), the above check becomes not useful.
> This JIRA aims to remove the inconsistency by automatically detecting the presence of
overridden Filter#filterRow(). If filterRow() is implemented and not inherited from FilterBase,
it is equivalent to having hasFilterRow() return true.

This message was sent by Atlassian JIRA

View raw message