Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8B258200D69 for ; Wed, 27 Dec 2017 09:02:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 8994F160C23; Wed, 27 Dec 2017 08:02:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CB56E160C20 for ; Wed, 27 Dec 2017 09:02:04 +0100 (CET) Received: (qmail 63981 invoked by uid 500); 27 Dec 2017 08:02:03 -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 63970 invoked by uid 99); 27 Dec 2017 08:02:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Dec 2017 08:02:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 7459A180164 for ; Wed, 27 Dec 2017 08:02:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id rivrrBPEuISA for ; Wed, 27 Dec 2017 08:02:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 5203C5F30B for ; Wed, 27 Dec 2017 08:02:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 7DB39E08C2 for ; Wed, 27 Dec 2017 08:02:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 3D5E8240DE for ; Wed, 27 Dec 2017 08:02:00 +0000 (UTC) Date: Wed, 27 Dec 2017 08:02:00 +0000 (UTC) From: "Zheng Hu (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-18410) FilterList Improvement. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 27 Dec 2017 08:02:05 -0000 [ https://issues.apache.org/jira/browse/HBASE-18410?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:all-tabpanel ] Zheng Hu updated HBASE-18410: ----------------------------- Release Note:=20 In this task, we fixed all existing bugs in FilterList, and did the code re= factor which ensured interface compatibility . =20 The primary bug fixes are :=20 1. For sub-filter in FilterList with MUST_PASS_ONE, if previous filterKeyVa= lue() of sub-filter returns NEXT_COL, we cannot make sure that the next cel= l will be the first cell in next column, because FilterList choose the mini= mal forward step among sub-filters, and it may return a SKIP. so here we ad= d an extra check to ensure that the next cell will match preivous return co= de for sub-filters.=20 2. Previous logic about transforming cell of FilterList is incorrect, we sh= ould set the previous transform result (rather than the given cell in quest= ion) as the initial vaule of transform cell before call filterKeyValue() of= FilterList. 3. Handle the ReturnCodes which the previous code did not handle.=20 About code refactor, we divided the FilterList into two separated sub-class= es: FilterListWithOR and FilterListWithAND, The FilterListWithOR has been = optimised to choose the next minimal step to seek cell rather than SKIP cel= l one by one, and the FilterListWithAND has been optimised to choose the n= ext maximal key to seek among sub-filters in filter list. All in all, The c= ode in FilterList is clean and easier to follow now. Note that ReturnCode NEXT_ROW has been redefined as skipping to next row in= current family, not to next row in all family. it=E2=80=99s more reasona= ble, because ReturnCode is a concept in store level, not in region level. Another bug that needs attention is: filterAllRemaining() in FilterList wit= h MUST_PASS_ONE will now return false if the filter list is empty whereas = earlier it used to return true for Operator.MUST_PASS_ONE. it's more reaso= nable now. was: In this task, we fixed all existing bugs in FilterList, and did the code re= factor which ensured interface compatibility . =20 The primary bug fixes are :=20 1. For sub-filter in FilterList with MUST_PASS_ONE, if previous filterKeyVa= lue() of sub-filter returns NEXT_COL, we cannot make sure that the next cel= l will be the first cell in next column, because FilterList choose the mini= mal forward step among sub-filters, and it may return a SKIP. so here we ad= d an extra check to ensure that the next cell will match preivous return co= de for sub-filters.=20 2. Previous logic about transforming cell of FilterList is incorrect, we sh= ould set the previous transform result (rather than the given cell in quest= ion) as the initial vaule of transform cell before call filterKeyValue() of= FilterList. 3. Handle the ReturnCodes which the previous code did not handle.=20 About code refactor, we divided the FilterList into two separated sub-class= es: FilterListWithOR and FilterListWithAND, The FilterListWithOR has been = optimised to choose the next minimal step to seek cell rather than SKIP cel= l one by one, and the FilterListWithAND has been optimised to choose the n= ext maximal key to seek among sub-filters in filter list. All in all, The c= ode in FilterList is clean and easier to follow now. Note that ReturnCode NEXT_ROW has been redefined as skipping to next row in= current family, not to next row in all family. it=E2=80=99s more reasona= ble, because ReturnCode is a concept in store level, not in region level. Another bug that needs attention is:=20 > FilterList Improvement.=20 > ------------------------- > > Key: HBASE-18410 > URL: https://issues.apache.org/jira/browse/HBASE-18410 > Project: HBase > Issue Type: Umbrella > Components: Filters > Reporter: Zheng Hu > Assignee: Zheng Hu > Fix For: 2.0.0-alpha-4 > > > FilterList.java is complex now, and we have found some improvements for i= t. So create an issue to address it. =20 -- This message was sent by Atlassian JIRA (v6.4.14#64029)