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

client.Result uses inverted Comparator<Long> in the versionMap (containted in familyMap)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: None
    • Fix Version/s: 0.89.20100924
    • Component/s: None
    • Labels:
      None

      Description

      In getMap() method the comparator passed to versionMap does:

      public int compare(Long l1, Long l2)

      { return l2.compareTo(l1); }

      which inverts the result of the comparison.

        Activity

        Hide
        streamy Jonathan Gray added a comment -

        Hi Ivan.

        This is actually the correct behavior. In HBase, we sort rows and columns in ascending, lexicographical order. However, versions are sorted in descending order (most recent version appears first).

        If I'm somehow not understanding the issue, please do re-open the JIRA and provide more explanation. Thanks!

        Show
        streamy Jonathan Gray added a comment - Hi Ivan. This is actually the correct behavior. In HBase, we sort rows and columns in ascending, lexicographical order. However, versions are sorted in descending order (most recent version appears first). If I'm somehow not understanding the issue, please do re-open the JIRA and provide more explanation. Thanks!
        Hide
        iivalchev Ivan Valchev added a comment -

        Hi Jonathan,

        So I guess this:

        getMap().get(family).get(qualifier).lowerKey(HConstants.LATEST_TIMESTAMP) == null

        being always true is the correct behavior. I know versions are sorted in descending order but navigating through the versionMap is some how counterintuitive

        Show
        iivalchev Ivan Valchev added a comment - Hi Jonathan, So I guess this: getMap().get(family).get(qualifier).lowerKey(HConstants.LATEST_TIMESTAMP) == null being always true is the correct behavior. I know versions are sorted in descending order but navigating through the versionMap is some how counterintuitive
        Hide
        ryanobjc ryan rawson added a comment -

        Have a look at the raw interface for more options.

        Show
        ryanobjc ryan rawson added a comment - Have a look at the raw interface for more options.
        Hide
        lars_francke Lars Francke added a comment -

        This issue was closed as part of a bulk closing operation on 2015-11-20. All issues that have been resolved and where all fixVersions have been released have been closed (following discussions on the mailing list).

        Show
        lars_francke Lars Francke added a comment - This issue was closed as part of a bulk closing operation on 2015-11-20. All issues that have been resolved and where all fixVersions have been released have been closed (following discussions on the mailing list).

          People

          • Assignee:
            Unassigned
            Reporter:
            iivalchev Ivan Valchev
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development