hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Hofhansl (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HBASE-10965) Automate detection of presence of Filter#filterRow()
Date Sun, 13 Apr 2014 00:35:16 GMT

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

Lars Hofhansl edited comment on HBASE-10965 at 4/13/14 12:34 AM:
-----------------------------------------------------------------

Is this right?
{code}
-          if ((isEmptyRow || ret == FilterWrapper.FilterRowRetCode.EXCLUDE) || filterRow())
{
+          if ((isEmptyRow || ret == FilterWrapper.FilterRowRetCode.EXCLUDE)) {
{code}

And this? (why not continue to call hasFilterRow(), which we just fixed in the patch to do
right thing, and more importantly cache the outcode)
{code}
-    if (this.hasFilter() && this.filter.hasFilterRow()) {
+    if (this.hasFilter() && FilterWrapper.isFilterMethodImplemented(this.filter,
"filterRow")) {
{code}

The last point raises a bigger discussion: If we autodetect this, it should be removed from
the filter API completely and moved into the framework. I.e. there's no need for Filter to
even have hasFilterRow() anymore.

Lastly, it would certainly be nice to autodetect this. Is it worth the effort, though?



was (Author: lhofhansl):
Is this right?
{code}
-          if ((isEmptyRow || ret == FilterWrapper.FilterRowRetCode.EXCLUDE) || filterRow())
{
+          if ((isEmptyRow || ret == FilterWrapper.FilterRowRetCode.EXCLUDE)) {
{code}

And this? (why not continue to call hasFilterRow(), which we just fixed in the patch to do
right thing, and most important cache the outcode)
{code}
-    if (this.hasFilter() && this.filter.hasFilterRow()) {
+    if (this.hasFilter() && FilterWrapper.isFilterMethodImplemented(this.filter,
"filterRow")) {
{code}

The last point raises a bigger discussion: If we autodetect this, it should be removed from
the filter API completely and moved into the framework. I.e. there's no need for Filter to
even have hasFilterRow() anymore.

Lastly, it would certainly be nice to autodetect this. Is it worth effort, though?


> Automate detection of presence of Filter#filterRow()
> ----------------------------------------------------
>
>                 Key: HBASE-10965
>                 URL: https://issues.apache.org/jira/browse/HBASE-10965
>             Project: HBase
>          Issue Type: Task
>            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).
> 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
(v6.2#6252)

Mime
View raw message