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

Scan different TimeRange for each column family

    XMLWordPrintableJSON

Details

    • Reviewed
    • Adds being able to Scan each column family with a different time range. Adds new methods setColumnFamilyTimeRange and getColumnFamilyTimeRange to Scan.

    Description

      At present the Scan API supports only table level time range. We have specific use cases that will benefit from per column family time range. (See background discussion at https://mail-archives.apache.org/mod_mbox/hbase-user/201508.mbox/%3CCAA4mzom00ef5eoXStK0HEtxebY8mQSs61GBVGttgpASpmhQHaw@mail.gmail.com%3E)

      There are a couple of choices that would be good to validate. First - how to update the Scan API to support family and table level updates. One proposal would be to add Scan.setTimeRange(byte family, long minTime, long maxTime), then store it in a Map<byte[], TimeRange>. When executing the scan, if a family has a specified TimeRange, then use it, otherwise fall back to using the table level TimeRange. Clients using the new API against old region servers would not get the families correctly filterd. Old clients sending scans to new region servers would work correctly.

      The other question is how to get StoreFileScanner.shouldUseScanner to match up the proper family and time range. It has the Scan available but doesn't currently have available which family it is a part of. One option would be to try to pass down the column family in each constructor path. Another would be to instead alter shouldUseScanner to pass down the specific TimeRange to use (similar to how it currently passes down the columns to use which also appears to be a workaround for not having the family available).

      Attachments

        1. HBASE-14355-v9.patch
          138 kB
          churro morales
        2. HBASE-14355-v8.patch
          138 kB
          churro morales
        3. HBASE-14355-v7.patch
          138 kB
          churro morales
        4. HBASE-14355-v6.patch
          137 kB
          churro morales
        5. HBASE-14355-v5.patch
          136 kB
          churro morales
        6. HBASE-14355-v4.patch
          133 kB
          churro morales
        7. HBASE-14355-v3.patch
          132 kB
          churro morales
        8. HBASE-14355-v2.patch
          127 kB
          churro morales
        9. HBASE-14355-v11.patch
          138 kB
          churro morales
        10. HBASE-14355-v10.patch
          138 kB
          churro morales
        11. HBASE-14355-v1.patch
          127 kB
          churro morales
        12. HBASE-14355-addendum.patch
          5 kB
          churro morales
        13. HBASE-14355.patch
          125 kB
          churro morales
        14. HBASE-14355.branch-1.patch
          137 kB
          churro morales

        Issue Links

          Activity

            People

              churromorales churro morales
              davelatham Dave Latham
              Votes:
              0 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: