You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Paul Ambrose <pa...@mac.com> on 2009/12/22 00:44:58 UTC

Filter.filterRow() for Get

The docs for Get.setFilter() say that "Only Filter.filterKeyValue(KeyValue) is called 
AFTER all tests for ttl, column match, deletes and max versions have been run."

The docs for Filter.filterRow() say that it will be invoked as the final chance to
filter a row (without regard to it being a Scan or Get).

My debugging suggests that Filter.filterRow() is not called for a Get
(consistent with the Get docs but inconsistent with the Filter docs). 
That is problematic if you are building state with calls to 
filterKeyValue() and make a final determination in filterRow().
If filterRow() is not called, then you are unable to write a filter that refers to
multiple KeyValues.  

My question: is it intentional that filterRow() is not called for Gets?
It seems that filter behavior asymmetry between Scan and Get is a problem 
(assuming this was intentional rather than a bug).

Thanks,
Paul


Re: Filter.filterRow() for Get

Posted by stack <st...@duboce.net>.
On Mon, Dec 21, 2009 at 3:44 PM, Paul Ambrose <pa...@mac.com> wrote:

> My question: is it intentional that filterRow() is not called for Gets?
> It seems that filter behavior asymmetry between Scan and Get is a problem
> (assuming this was intentional rather than a bug).
>
> The two should work the same.  I'd doubt it intentional.  Filters in
scanners are more mature and have had the most attention so however they
work, Get should follow (filters in Get were new with 0.20.0).

Hope this helps.

Thanks Paul,
St.Ack