hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zheng Hu (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HBASE-18160) Fix incorrect logic in FilterList.filterKeyValue
Date Fri, 11 Aug 2017 15:25:01 GMT

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

Zheng Hu edited comment on HBASE-18160 at 8/11/17 3:24 PM:
-----------------------------------------------------------

Attached a localcode to returncode map for filter list with or.   it means: if previous return
code is returncode, and the current sub-filter in filter list with OR return localcode,  
then  current return code will be map[localcode][returncode].


was (Author: openinx):
Attached a localcode to returncode map for filter list with or: 
{code}
LocalCode\ReturnCode       INCLUDE INCLUDE_AND_NEXT_COL     INCLUDE_AND_SEEK_NEXT_ROW  SKIP
     NEXT_COL              NEXT_ROW                  NEXT_FAMILY               SEEK_NEXT_USING_HINT
INCLUDE                    INCLUDE INCLUDE                  INCLUDE                    INCLUDE
  INCLUDE               INCLUDE                   INCLUDE                   INCLUDE      

INCLUDE_AND_NEXT_COL       INCLUDE INCLUDE_AND_NEXT_COL     INCLUDE_AND_NEXT_COL       INCLUDE
  INCLUDE_AND_NEXT_COL  INCLUDE_AND_NEXT_COL      INCLUDE_AND_NEXT_COL      INCLUDE
INCLUDE_AND_SEEK_NEXT_ROW  INCLUDE INCLUDE_AND_NEXT_COL     INCLUDE_AND_SEEK_NEXT_ROW  INCLUDE
  INCLUDE_AND_NEXT_COL  INCLUDE_AND_SEEK_NEXT_ROW INCLUDE_AND_SEEK_NEXT_ROW INCLUDE
SKIP                       INCLUDE INCLUDE                  INCLUDE                    SKIP
     SKIP                  SKIP                      SKIP                      SKIP
NEXT_COL                   INCLUDE INCLUDE_AND_NEXT_COL     INCLUDE_AND_NEXT_COL       SKIP
     NEXT_COL              NEXT_COL                  NEXT_COL                  SKIP 
NEXT_ROW                   INCLUDE INCLUDE_AND_NEXT_COL     INCLUDE_AND_SEEK_NEXT_ROW  SKIP
     NEXT_COL              NEXT_ROW                  NEXT_ROW                  SKIP
NEXT_FAMILY                INCLUDE INCLUDE_AND_NEXT_COL     INCLUDE_AND_SEEK_NEXT_ROW  SKIP
     NEXT_COL              NEXT_ROW                  NEXT_FAMILY               SKIP      
SEEK_NEXT_USING_HINT       INCLUDE INCLUDE                  INCLUDE                    SKIP
     SKIP                  SKIP                      SKIP                      SKIP
{code}

> Fix incorrect  logic in FilterList.filterKeyValue
> -------------------------------------------------
>
>                 Key: HBASE-18160
>                 URL: https://issues.apache.org/jira/browse/HBASE-18160
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Zheng Hu
>            Assignee: Zheng Hu
>         Attachments: filter-or-map.txt, HBASE-18160.branch-1.1.v1.patch, HBASE-18160.branch-1.v1.patch,
HBASE-18160.v1.patch, HBASE-18160.v2.patch, HBASE-18160.v2.patch, HBASE-18160.v3.patch
>
>
> As HBASE-17678 said, there are two problems in FilterList.filterKeyValue implementation:

> 1.  FilterList did not consider INCLUDE_AND_SEEK_NEXT_ROW case( seems like INCLUDE_AND_SEEK_NEXT_ROW
is a newly added case, and the dev forgot to consider FilterList), So if a user use INCLUDE_AND_SEEK_NEXT_ROW
in his own Filter and wrapped by a FilterList,  it'll  throw  an IllegalStateException("Received
code is not valid."). 
> 2.  For FilterList with MUST_PASS_ONE,   if filter-A in filter list return  INCLUDE and
filter-B in filter list return INCLUDE_AND_NEXT_COL,   the FilterList will return  INCLUDE_AND_NEXT_COL
finally.  According to the mininal step rule , It's incorrect.  (filter list with MUST_PASS_ONE
choose the mininal step among filters in filter list. Let's call it: The Mininal Step Rule).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message