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

Scan javadoc doesn't fully capture semantics of start and stop row

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.0.0
    • documentation
    • None

    Description

      The current javadoc for Scan#setStartRow and Scan#setStopRow methods don't accurately capture the semantics of the use of row prefix values. Both methods describe the use of a trailing null byte to change the inclusive/exclusive the respective semantics of setStartRow and setStopRow.

      The use of a trailing null byte for start row exclusion only works in the case that exact full matching is done on row keys. The use of a trailing null byte for stop row inclusion has even more limitations (see HBASE-9035).

      The basic example is having the following rows:

      AAB
      ABB
      BBC
      BCC
      

      Setting the start row to A and the stop row to B will include AAB and AB.

      Setting the start row to A\x0 and the stop row to B\x0 will result in the same two rows coming out of the scan, instead of having an effect on the inclusion/exclusion semantics.

      Attachments

        1. HBASE-9763.patch
          1 kB
          Gabriel Reid

        Activity

          People

            gabriel.reid Gabriel Reid
            gabriel.reid Gabriel Reid
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: