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

block encoder unnecessarily copies the key for each reseek

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.98.0, 0.94.13, 0.96.1
    • None
    • None
    • Reviewed

    Description

      In HFileReaderV2.AbstractScannerV2.reseekTo(...) we have this:

              ByteBuffer bb = getKey();
              compared = reader.getComparator().compare(key, offset,
                  length, bb.array(), bb.arrayOffset(), bb.limit());
      

      getKey() creates two ByteBuffers in ScannerV2 and makes a deep copy of the key in EncodedScannerV2.

      Attachments

        1. 9807-0.94.txt
          6 kB
          Lars Hofhansl
        2. 9807-0.94-v2.txt
          4 kB
          Lars Hofhansl
        3. 9807-0.94-v3.txt
          4 kB
          Lars Hofhansl
        4. 9807-trunk-v1.txt
          5 kB
          Lars Hofhansl

        Activity

          People

            larsh Lars Hofhansl
            larsh Lars Hofhansl
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: