ramkrishna.s.vasudevan created HBASE-17235:

             Summary: Minor improvement in creation of CIS for onheap buffer 
                 Key: HBASE-17235
                 URL: https://issues.apache.org/jira/browse/HBASE-17235
             Project: HBase
          Issue Type: Improvement
            Reporter: ramkrishna.s.vasudevan
            Assignee: ramkrishna.s.vasudevan
            Priority: Minor

      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, 

This message was sent by Atlassian JIRA

Reply via email to