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

Support configuring KeyValue Comparator at table level

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 0.95.2
    • None
    • regionserver
    • None

    Description

      Now, KeyValue Comparator is static by code in HRegionInfo

        public KVComparator getComparator() {
          return isRootRegion()? KeyValue.ROOT_COMPARATOR: isMetaRegion()?
            KeyValue.META_COMPARATOR: KeyValue.COMPARATOR;
        }
      

      In some user cases, we need a personalized KeyValue Comparator.
      e.g. Current ByteArrayComparator couldn't be used to sort number if exists negative number.(Because the bytes of -1 is bigger than the bytes of any other number)

      I think supporting per-table configuration of KeyValue Comparator would be useful.

      Welcome comments,
      I will make the patch tomorrow.

      Attachments

        Activity

          People

            Unassigned Unassigned
            zjushch Chunhui Shen
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: