hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 唐天航 <tangtianhang...@gmail.com>
Subject [DISCUSS] HBASE-25299 Scan#setRowPrefixFilter Unexpected behavior
Date Wed, 18 Nov 2020 07:46:16 GMT
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