Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3781E1166A for ; Wed, 16 Apr 2014 15:14:27 +0000 (UTC) Received: (qmail 69273 invoked by uid 500); 16 Apr 2014 15:14:22 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 69183 invoked by uid 500); 16 Apr 2014 15:14:20 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 69146 invoked by uid 99); 16 Apr 2014 15:14:19 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Apr 2014 15:14:19 +0000 Date: Wed, 16 Apr 2014 15:14:19 +0000 (UTC) From: "Ted Yu (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-10965) Automate detection of presence of Filter#filterRow() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-10965?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HBASE-10965: --------------------------- Description: 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 limit!"); } {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. was: 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: if (nextKv == KV_LIMIT) { if (this.filter != null && filter.hasFilterRow()) { throw new IncompatibleFilterException( "Filter whose hasFilterRow() returns true is incompatible with scan with limit!"); } 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. > 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). > 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 limit!"); > } > {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 (v6.2#6252)