FAQ
Hi,

Am I wrong or is there a lack of documentation for the FilterModel for
the filters in Stargate? The Wiki
http://wiki.apache.org/hadoop/Hbase/HbaseRest points to an old 0.20.4
documentation (although saying it is the new place) and the other page
we have is void of details on the filters for scans, i.e.
http://wiki.apache.org/hadoop/Hbase/Stargate

They are implemented in
https://issues.apache.org/jira/browse/HBASE-1696 (also see the linked
https://issues.apache.org/jira/browse/HBASE-2274) but no description
is public. I used a little helper to get the details like so

import org.apache.hadoop.hbase.filter.BinaryComparator;
import org.apache.hadoop.hbase.filter.CompareFilter;
import org.apache.hadoop.hbase.filter.Filter;
import org.apache.hadoop.hbase.filter.RowFilter;
import org.apache.hadoop.hbase.rest.model.ScannerModel;
import org.apache.hadoop.hbase.util.Bytes;

public class TestFilter {

public static void main(String[] args) {
Filter f = new RowFilter(CompareFilter.CompareOp.EQUAL, new
BinaryComparator(Bytes.toBytes("testrow")));
try {
System.out.println(ScannerModel.stringifyFilter(f));
} catch (Exception e) {
e.printStackTrace();
}
}
}

giving

{"op":"EQUAL","type":"RowFilter","comparator":{"value":"dGVzdHJvdw==","type":"BinaryComparator"}}

Obviously this can be also seen from the FilterModel class but I
assume we need some documentation on that Stargate page?

Should I open a JIRA?

Thanks,
Lars

Search Discussions

  • Andrew Purtell at Jan 25, 2011 at 10:37 pm
    Hi Lars,

    Yes please open a Jira, target to 90.1, and assign to me.

    Best regards,

    - Andy

    Problems worthy of attack prove their worth by hitting back.
    - Piet Hein (via Tom White)


    --- On Tue, 1/25/11, Lars George wrote:
    From: Lars George <lars.george@gmail.com>
    Subject: Missing filter documentation for Stargate
    To: dev@hbase.apache.org, "apurtell" <apurtell@apache.org>
    Date: Tuesday, January 25, 2011, 10:27 AM
    Hi,

    Am I wrong or is there a lack of documentation for the
    FilterModel for
    the filters in Stargate? The Wiki
    http://wiki.apache.org/hadoop/Hbase/HbaseRest points to
    an old 0.20.4
    documentation (although saying it is the new place) and the
    other page
    we have is void of details on the filters for scans, i.e.
    http://wiki.apache.org/hadoop/Hbase/Stargate

    They are implemented in
    https://issues.apache.org/jira/browse/HBASE-1696 (also
    see the linked
    https://issues.apache.org/jira/browse/HBASE-2274) but
    no description
    is public. I used a little helper to get the details like
    so

    import org.apache.hadoop.hbase.filter.BinaryComparator;
    import org.apache.hadoop.hbase.filter.CompareFilter;
    import org.apache.hadoop.hbase.filter.Filter;
    import org.apache.hadoop.hbase.filter.RowFilter;
    import org.apache.hadoop.hbase.rest.model.ScannerModel;
    import org.apache.hadoop.hbase.util.Bytes;

    public class TestFilter {

    public static void main(String[] args) {
    Filter f = new
    RowFilter(CompareFilter.CompareOp.EQUAL, new
    BinaryComparator(Bytes.toBytes("testrow")));
    try {

    System.out.println(ScannerModel.stringifyFilter(f));
    } catch (Exception e) {
    e.printStackTrace();
    }
    }
    }

    giving

    {"op":"EQUAL","type":"RowFilter","comparator":{"value":"dGVzdHJvdw==","type":"BinaryComparator"}}

    Obviously this can be also seen from the FilterModel class
    but I
    assume we need some documentation on that Stargate page?

    Should I open a JIRA?

    Thanks,
    Lars

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categorieshbase, hadoop
postedJan 25, '11 at 6:28p
activeJan 25, '11 at 10:37p
posts2
users2
websitehbase.apache.org

2 users in discussion

Andrew Purtell: 1 post Lars George: 1 post

People

Translate

site design / logo © 2022 Grokbase