[
https://issues.apache.org/jira/browse/HBASE-7892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13585578#comment-13585578
]
Zou, Mickey commented on HBASE-7892:
------------------------------------
In the javadoc, I only find that 'I.e. fuzzy info tells the matching mask is
"????_99_????_01", where at ? can be any value.'.Here the problem is that the
getNextKeyHint method may skip the range from byte \x00 to the value of ? when
the ? is not \x00. Is it really do as design?
{code:title=FuzzyRowFilter.java|borderStyle=solid}
else if (i < fuzzyKeyMeta.length && fuzzyKeyMeta[i] == 0) {
if ((row[i + offset] & 0xFF) < (fuzzyKeyBytes[i] & 0xFF)) {
// if setting value for any fixed position increased the original array,
// we are OK
increased = true;
break;//after break the ? after the current position contains the value
passed by user
}
{code}
IMO,the problem is really caused by the above code and setting the '?' to \x00
is just another way to fix it.
[~alexb], would you please check it again?
> FuzzyRowFilter would have wrong behaviors if user gives an arbitary byte for
> an "unfixed" position instead of byte 0
> --------------------------------------------------------------------------------------------------------------------
>
> Key: HBASE-7892
> URL: https://issues.apache.org/jira/browse/HBASE-7892
> Project: HBase
> Issue Type: Improvement
> Components: Filters
> Affects Versions: 0.96.0, 0.94.5
> Reporter: Maryann Xue
> Assignee: Maryann Xue
> Priority: Minor
> Attachments: HBASE-7892-0.94.patch
>
>
> An actual case can be:
> we want to match "a?ex", so we give "a?ex" as input of "key bytes", and
> "0100" as input of "meta bytes".
> if we start with row = "\0\0\0\0", the next hint would turn out to be "a?ex"
> while actually the right hint should be "a\0ex".
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira