hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ryan rawson (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-1647) Filter#filterRow is called too often, filters rows it shouldn't have
Date Mon, 13 Jul 2009 20:21:14 GMT

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

ryan rawson commented on HBASE-1647:
------------------------------------

I'm afraid this patch is not good, the assumptions of the reporter are not correct, we in
fact see things in this order:

row1 / col1
row1 / col2
row2 / col1
row2 / col2

This patch removes a key piece of functionality I built into the new API that allows us to
post-facto filter a row.

The API needs to be clearer perhaps.  The intent is:

- use filterRowKey() to have the earliest chance to filter an entire row based on the _KEY_
only.
- for more complex processing, implement filterKeyValue() and set internal state. 
-- At the "End" of the KeyValues for a row, filterRow() will be called, and you can choose,
based on that state, to filter the row.  Eg: if a column was missing (which you can't know
until you hit the end of the KeyValues for a row).  

If you don't use this feature, implement filterRow() { return false; }.  The JIT hotspot will
take care of optimizing things.


> Filter#filterRow is called too often, filters rows it shouldn't have
> --------------------------------------------------------------------
>
>                 Key: HBASE-1647
>                 URL: https://issues.apache.org/jira/browse/HBASE-1647
>             Project: Hadoop HBase
>          Issue Type: Bug
>    Affects Versions: 0.20.0
>            Reporter: Doğacan Güney
>             Fix For: 0.20.0
>
>         Attachments: HBASE-1647-v2.patch, ScanBug.java, scanfilter.patch
>
>
> Filter#filterRow is called from ScanQueryMatcher#filterEntireRow which is called from
StoreScanner.next. However, if I understood the code correctly, StoreScanner processes KeyValue-s
in a column-oriented order (i.e. after row1-col1 comes row2-col1, not row1-col2). Thus, when
filterEntireRow is called, in reality, the filter only processed (via filterKeyValue) only
one column of a row.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message