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

Improve Hbase Thrift v1 to return results in sorted order

    XMLWordPrintableJSON

Details

    • Reviewed
    • Hide
      When passing a TScan object, it's possible to ask for sortColumns. The result of doing this will populate TRowResult's "sortedColumns" instead of "columns", where the former is a list of the new type TColumn that wraps a column name and a TCell.
      Backward compatibility is kept. Old clients will work against thrift servers with this patch, but new clients cannot request sorted columns on an old thrift server.
      Show
      When passing a TScan object, it's possible to ask for sortColumns. The result of doing this will populate TRowResult's "sortedColumns" instead of "columns", where the former is a list of the new type TColumn that wraps a column name and a TCell. Backward compatibility is kept. Old clients will work against thrift servers with this patch, but new clients cannot request sorted columns on an old thrift server.

    Description

      Hbase natively stores columns sorted based on the column qualifier. A scan is guaranteed to return sorted columns. The Java API works fine but the Thrift API is broken. Hbase uses TreeMap that ensures that sort order is maintained. However Hbase thrift specification uses a simple Map to store the data. A map, since it is unordered doesn't result in columns being returned in a sort order that is consistent with their storage in Hbase.

      Attachments

        1. HBASE-7826-0.94-v7.patch
          54 kB
          Jean-Daniel Cryans
        2. 7826-v6.patch
          55 kB
          Ted Yu
        3. HBASE-7826.patch
          59 kB
          Jean-Daniel Cryans
        4. hbase_7826_sortcolumnFlag.5.patch
          58 kB
          Shivendra Pratap Singh
        5. hbase_7826_sortcolumnFlag.4.patch
          56 kB
          Shivendra Pratap Singh
        6. hbase_7826_trunk.patch
          57 kB
          Shivendra Pratap Singh
        7. hbase_7826_sortcolumnFlag.3.patch
          56 kB
          Shivendra Pratap Singh
        8. hbase_7826_sortcolumnFlag.2.patch
          55 kB
          Shivendra Pratap Singh
        9. hbase_7826_sortcolumnFlag.1.patch
          59 kB
          Shivendra Pratap Singh
        10. hbase_7826_sortcolumnFlag.patch
          59 kB
          Shivendra Pratap Singh
        11. hbase_7826.patch
          36 kB
          Shivendra Pratap Singh
        12. hbase_7826.patch
          31 kB
          Shivendra Pratap Singh

        Issue Links

          Activity

            People

              shiven Shivendra Pratap Singh
              shiven Shivendra Pratap Singh
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: