You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Andrew Kyle Purtell (Jira)" <ji...@apache.org> on 2022/06/12 00:53:00 UTC

[jira] [Resolved] (HBASE-3482) [REST] Add documentation for filter definition in JSON

     [ https://issues.apache.org/jira/browse/HBASE-3482?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Kyle Purtell resolved HBASE-3482.
----------------------------------------
    Resolution: Won't Fix

> [REST] Add documentation for filter definition in JSON
> ------------------------------------------------------
>
>                 Key: HBASE-3482
>                 URL: https://issues.apache.org/jira/browse/HBASE-3482
>             Project: HBase
>          Issue Type: Improvement
>          Components: REST
>    Affects Versions: 2.0.0
>            Reporter: Lars George
>            Priority: Minor
>
> Copied from email in dev@:
> 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
> {code}
> 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();
>    }
>  }
> }
> {code}
> giving
> {code}
> {"op":"EQUAL","type":"RowFilter","comparator":{"value":"dGVzdHJvdw==","type":"BinaryComparator"}}
> {code}
> Obviously this can be also seen from the FilterModel class but I assume we need some documentation on that Stargate page?



--
This message was sent by Atlassian Jira
(v8.20.7#820007)