HBase
  1. HBase
  2. HBASE-9867

Save on array copies with a subclass of LiteralByteString

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.96.0
    • Fix Version/s: 0.98.0, 0.96.1
    • Component/s: Protobufs
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Any time we add a byte array to a protobuf, it'll copy the byte array.

      I was playing with the client and noticed how a bunch of CPU and copying was being done just to copy basic arrays doing pb construction. I started to look at ByteString and then remembered a class Benoit sent me a while back that I did not understand from his new AsyncHBase. After looking in ByteString it made now sense. So, rather than copy byte arrays everywhere, do a version of a ByteString that instead wraps the array.

      1. 9867.096.txt
        95 kB
        stack
      2. 9867.txt
        85 kB
        stack
      3. 9867.txt
        85 kB
        stack
      4. 9867v2.txt
        84 kB
        stack

        Activity

          People

          • Assignee:
            stack
            Reporter:
            stack
          • Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development