Hello Alex,

What you are looking is the FuzzyRowFilter, however it is not exposed via
REST (see HBASE-7983) or even Thrift. Extending the ScannerModel to support
FuzzyRowFilter I think is the easiest way to go, but it would be nice to
address the proposed solution that was mentioned in that JIRA to make
easier to extend the filters, for now I have created HBASE-14060 to add
FuzzyRowFilter to ParseFilter, at least at will make easier to use it via
Thrift and eventually REST.

cheers,
esteban.


--
Cloudera, Inc.


On Fri, Jul 10, 2015 at 8:35 AM, Alex Bedley <[email protected]> wrote:

> Hello,
>
> I'm trying to retrieve rows from my table using a prefix and a suffix via
> the REST API.
>
> The prefix for my rowkey is a fixed value (and a fixed length). The suffix
> is fixed length and can be one of a few possible known values. The part
> between the prefix and the suffix is also fixed length but can be any
> value.
>
> For example say my prefix is always the byte array [1, 2, 3, 4] and my
> suffix is either [1,1,1,1] or [2,2,2,2], and the middle part is always 4
> bytes, then
>
> [1, 2, 3, 4, 9, 8 ,7 ,6, 1, 1, 1, 1] would satisfy
> [1, 2, 3, 4, 5, 3, 5, 8, 2, 2, 2, 2] would satisfy
>
> [1, 2, 3, 9, 3, 1, 0, 9, 2, 2, 2, 2] would not satisfy (bad prefix)
> [1, 2, 3, 4, 5, 4, 8, 0, 3, 3, 3, 3] would not satisfy (bad suffix)
>
> I tried using a RowFilter with a RegexStringComparator but I think the
> default encoding for the RegexStringComparator is UTF8, which is not fixed
> length, so I can't guarantee what my suffix will look like in UTF8 (because
> the suffix could be preceded by anything, possibly making the suffix not
> start on a character boundary).
>
> Can you change the encoding over REST (to a fixed length encoding)? Or is
> there another filter I should be using?
>
> Thank you for your time,
>
> - Alex
>

Reply via email to