Grokbase Groups HBase dev July 2012
FAQ
Hi Devs,

The javadoc for SkipFilter (
http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/filter/SkipFilter.html)
states :

A wrapper filter that filters an entire row if any of the KeyValue checks
do not pass.

But the example same javadocs gives to support this statement is wrong. The
*scan.setFilter(new SkipFilter(new ValueFilter(CompareOp.EQUAL,
new BinaryComparator(Bytes.toBytes(0))));* , will only emit rows which
have all column values zero. In other words it is going to skip all rows
for which
ValueFilter(CompareOp.EQUAL, new BinaryComparator(Bytes.toBytes(0))) does
not pass , which happen to be all non zero valued cells.

In the same example a ValueFilter created with CompareOp.NOT_EQUAL will
filter out the rows which have a column value zero.

Please correct me if I am getting this wrong.

-Shrijeet

Search Discussions

  • Michael Stack at Jul 31, 2012 at 9:26 pm

    On Tue, Jul 31, 2012 at 7:39 AM, Shrijeet Paliwal wrote:
    Please correct me if I am getting this wrong.
    Do we have a unit test for SkipFilter? Does its operation agree or
    disagree w/ your finding? Otherwise, I'd just go w/ your finding
    Shrijeet. Any chance of a patch?

    Good on you Shrijeet.

    St.Ack
  • Shrijeet Paliwal at Jul 31, 2012 at 9:30 pm
    Stack,
    We do have unit test for SkipFilter. I skimmed through the test yesterday
    and it appeared to do the right thing. Just the example author came up in
    docs is misleading. I will check unit test again. Filed
    https://issues.apache.org/jira/browse/HBASE-6481 . Will submit patch.

    -Shrijeet
    On Tue, Jul 31, 2012 at 2:25 PM, Stack wrote:

    On Tue, Jul 31, 2012 at 7:39 AM, Shrijeet Paliwal
    wrote:
    Please correct me if I am getting this wrong.
    Do we have a unit test for SkipFilter? Does its operation agree or
    disagree w/ your finding? Otherwise, I'd just go w/ your finding
    Shrijeet. Any chance of a patch?

    Good on you Shrijeet.

    St.Ack
  • Shrijeet Paliwal at Aug 1, 2012 at 6:26 am

    On Tue, Jul 31, 2012 at 2:30 PM, Shrijeet Paliwal wrote:

    Stack,
    We do have unit test for SkipFilter. I skimmed through the test yesterday
    and it appeared to do the right thing. Just the example author came up in
    docs is misleading. I will check unit test again. Filed
    https://issues.apache.org/jira/browse/HBASE-6481 . Will submit patch.
    Verified unit tests and filter itself is behaving as expected. Only example
    need to be fixed. Will submit a patch.

    -Shrijeet

    On Tue, Jul 31, 2012 at 2:25 PM, Stack wrote:

    On Tue, Jul 31, 2012 at 7:39 AM, Shrijeet Paliwal
    wrote:
    Please correct me if I am getting this wrong.
    Do we have a unit test for SkipFilter? Does its operation agree or
    disagree w/ your finding? Otherwise, I'd just go w/ your finding
    Shrijeet. Any chance of a patch?

    Good on you Shrijeet.

    St.Ack
  • Michael Stack at Aug 1, 2012 at 10:04 pm

    On Wed, Aug 1, 2012 at 7:26 AM, Shrijeet Paliwal wrote:
    Verified unit tests and filter itself is behaving as expected. Only example
    need to be fixed. Will submit a patch.
    You are the man Shrijeet. Thanks.
    St.Ack

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categorieshbase, hadoop
postedJul 31, '12 at 6:40a
activeAug 1, '12 at 10:04p
posts5
users2
websitehbase.apache.org

2 users in discussion

Shrijeet Paliwal: 3 posts Michael Stack: 2 posts

People

Translate

site design / logo © 2022 Grokbase