hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guanghao Zhang <zghao...@gmail.com>
Subject Re: [DISCUSS] HBASE-25299 Scan#setRowPrefixFilter Unexpected behavior
Date Thu, 19 Nov 2020 00:32:16 GMT
I am +1 to deprecated setRowPrefixFilter method. This method name is
setRowPrefixFilter but not use filter and only set start row and end row. I
thought this could be done by user.

唐天航 <tangtianhang099@gmail.com> 于2020年11月19日周四 上午12:45写道:

> 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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message