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

Add a binary comparator that only compares up to the length of the supplied byte array

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.20.4, 0.90.0
    • Filters
    • None
    • Reviewed

    Description

      This new comparator is similar to the existing BinaryComparator, but only compares up to the length of the supplied byte array.

      The use-case I need this for is secondary indexes. I build a table where the row keys have the form

      {value}{row key}, where {value}

      is a fixed length byte array. On this index table I then would like to perform range scans on just the fixed length

      {value}

      part. The BinaryPrefixComparator supplied in this patch enables exactly this, when used in combination with the RowFilter.

      See also mail at
      http://mail-archives.apache.org/mod_mbox/hadoop-hbase-user/201002.mbox/%3Cf5a74c8e1002100716y56371298xc96e482a6486d939@mail.gmail.com%3E

      Attachments

        Activity

          People

            Unassigned Unassigned
            bruno Bruno Dumon
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: