HBase
  1. HBase
  2. HBASE-5625

Avoid byte buffer allocations when reading a value from a Result object

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.92.1
    • Fix Version/s: 0.95.0
    • Component/s: Client
    • Labels:
    • Hadoop Flags:
      Reviewed

      Description

      When calling Result.getValue(), an extra dummy KeyValue and its associated underlying byte array are allocated, as well as a persistent buffer that will contain the returned value.

      These can be avoided by reusing a static array for the dummy object and by passing a ByteBuffer object as a value destination buffer to the read method.

      The current functionality is maintained, and we have added a separate method call stack that employs the described changes. I will provide more details with the patch.

      Running tests with a profiler, the reduction of read time seems to be of up to 40%.

      1. 5625v8.txt
        38 kB
        Tudor Scurtu
      2. 5625v7.txt
        37 kB
        Tudor Scurtu
      3. 5625v6.txt
        34 kB
        Tudor Scurtu
      4. 5625v5.txt
        25 kB
        Tudor Scurtu
      5. 5625v4.txt
        25 kB
        Tudor Scurtu
      6. 5625v3.txt
        23 kB
        Tudor Scurtu
      7. 5625v2.txt
        15 kB
        Tudor Scurtu
      8. 5625.txt
        15 kB
        Tudor Scurtu

        Activity

          People

          • Assignee:
            Tudor Scurtu
            Reporter:
            Tudor Scurtu
          • Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development