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

Improvement in creation of CIS for onheap buffer cases

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • rpc
    • None
    • Reviewed

    Description

            if (buf.hasArray()) {
              cis = CodedInputStream.newInstance(buf.array(), offset, buf.limit());
            } else {
      

      Currently we do this for onheap buffers incase there is no reservoir or the size is less than the minSizeforReservoir. I could see that even if reservoir is there there are requests which goes with the above way of creating CIS. This could be made efficient to avoid underlying copies by just doing this

      cis = UnsafeByteOperations.unsafeWrap(buf.array(), offset, buf.limit()).newCodedInput();
      

      Attachments

        1. HBASE-17235_1.patch
          2 kB
          ramkrishna.s.vasudevan
        2. HBASE-17235.patch
          1 kB
          ramkrishna.s.vasudevan

        Activity

          People

            ram_krish ramkrishna.s.vasudevan
            ram_krish ramkrishna.s.vasudevan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: