HBase
  1. HBase
  2. HBASE-3245

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        6h 49m 1 Jonathan Gray 18/Nov/10 19:38
        Resolved Resolved Closed Closed
        1827d 17h 1m 1 Lars Francke 20/Nov/15 12:40
        Lars Francke made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        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 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).
        Hide
        ryan rawson added a comment -

        Have a look at the raw interface for more options.

        Show
        ryan rawson added a comment - Have a look at the raw interface for more options.
        Hide
        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
        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
        Jonathan Gray made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Not A Problem [ 8 ]
        Hide
        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
        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!
        Ivan Valchev created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development