Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-16833 Implement asynchronous hbase client based on HBASE-15921
  3. HBASE-17320

Add inclusive/exclusive support for startRow and endRow of scan

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • Client, Scanners
    • None
    • Reviewed
    • Hide
      Now you can specific the inclusive of startRow and stopRow for a scan using the new methods withStartRow(byte[] startRow, boolean inclusive) and withStopRow(byte[] stopRow, boolean inclusive). The old setStartRow and setStopRow methods, and the constructors are marked as deprecated because of an strange behavior that we will include the stopRow implicitly if startRow equals to stopRow. This is used to support get scan in the old time. Use withStartRow and withStopRow instead.

      For developers, the ConnectionUtils.createClosestRowBefore is also marked as deprecated as the row returned by this method is only very very close to the current row, not closest. Avoid using this method in the future.
      Show
      Now you can specific the inclusive of startRow and stopRow for a scan using the new methods withStartRow(byte[] startRow, boolean inclusive) and withStopRow(byte[] stopRow, boolean inclusive). The old setStartRow and setStopRow methods, and the constructors are marked as deprecated because of an strange behavior that we will include the stopRow implicitly if startRow equals to stopRow. This is used to support get scan in the old time. Use withStartRow and withStopRow instead. For developers, the ConnectionUtils.createClosestRowBefore is also marked as deprecated as the row returned by this method is only very very close to the current row, not closest. Avoid using this method in the future.

    Description

      This is especially useful when doing reverse scan. HBASE-17168 maybe a more powerful solution but we need to be careful about the atomicity, and I do not think we will provide the feature to end user. But I think it is OK to provide inclusive/exclusive option to end user.

      Attachments

        1. HBASE-17320-v6.patch
          131 kB
          Duo Zhang
        2. HBASE-17320-v5.patch
          131 kB
          Duo Zhang
        3. HBASE-17320-v4.patch
          131 kB
          Duo Zhang
        4. HBASE-17320-v3.patch
          131 kB
          Duo Zhang
        5. HBASE-17320-v2.patch
          131 kB
          Duo Zhang
        6. HBASE-17320-v1.patch
          129 kB
          Duo Zhang
        7. HBASE-17320.patch
          112 kB
          Duo Zhang

        Issue Links

          Activity

            People

              zhangduo Duo Zhang
              zhangduo Duo Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: