Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-25299

Scan#setRowPrefixFilter Unexpected behavior

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-alpha-1
    • Client, scan
    • None
    • Reviewed

    Description

      e.g.

      startRow : "112"

      rowPrefixFilter : "11"

      The Result of this scan might contains : "111", which 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.

      Attachments

        Issue Links

          Activity

            People

              tangtianhang tianhang tang
              tangtianhang tianhang tang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: