Hi,
I have opened an issue HBASE-25299
<https://issues.apache.org/jira/browse/HBASE-25299> about
Scan#setRowPrefixFilter
Unexpected behavior.
e.g.
startRow : "112"
rowPrefixFilter : "11"
The Result of this scan might contain : "111", which is unexpected.
public Scan setRowPrefixFilter(byte[] rowPrefix) {
if (rowPrefix == null) {
setStartRow(HConstants.EMPTY_START_ROW);
setStopRow(HConstants.EMPTY_END_ROW);
} else {
this.setStartRow(rowPrefix);
this.setStopRow(calculateTheClosestNextRowKeyForPrefix(rowPrefix));
}
return this;
}
Scan#setRowPrefixFilter achieves this function by setting startRow and
stopRow, ignoring the situation that startRow may have been set.
I have discussed this issue with @infraio and he suggested to deprecate
this method because modifying it may cause compatibility issues.
Is this plan acceptable? Hope to get some suggestions.
Thank you. Regards
|