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

ProtobufUtil seems to do extra array copying

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.3.2
    • 1.4.0, 1.2.6, 1.3.2, 1.1.11
    • None
    • None
    • Reviewed

    Description

      In ProtobufUtil, the protobuf fields are copied into an array using toByteArray(). These are then passed into the KeyValue constructor which does another copy.

      It seems like we can avoid a copy here by using HBaseZeroCopyByteString#zeroCopyGetBytes() ?

      Attachments

        1. HBASE-18026.addendum.patch
          1 kB
          Vincent Poon
        2. HBASE-18026.branch-1.v1.patch
          9 kB
          Vincent Poon
        3. HBASE-18026.master.v1.patch
          8 kB
          Vincent Poon

        Issue Links

          Activity

            People

              vincentpoon Vincent Poon
              vincentpoon Vincent Poon
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: