ramkrishna.s.vasudevan updated HBASE-16783:
    Attachment: HBASE-16783_2.patch

As said in previous it is not possible to add the header at the head of the 
buffers got from the pool because the cellblockMeta is a PB and so we can't be 
sure of the header's serialized to fill it after the cellblockMeta is formed. 
Hence now the header is added to the last byte buffer that forms this cellblock 
and that too if the last buffer has enough space in it to accomodate. IF not we 
create onheap buffer on demand. 
Since we are adding the buffer to the tail of the cellblock buffers we need to 
position the header part of the buffer and call a duplicate() on that and then 
pass it to the buffer chain. This still creates one object :(.
Later for nonPB cases if we can identify read related responses (there is no 
cellscanner there), then we could use this BBPool to form the message and 
header. (in nonPB case message is big enough).

> Use ByteBufferPool for the header and message during Rpc response
> -----------------------------------------------------------------
>                 Key: HBASE-16783
>                 URL: https://issues.apache.org/jira/browse/HBASE-16783
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: ramkrishna.s.vasudevan
>            Priority: Minor
>         Attachments: HBASE-16783.patch, HBASE-16783_1.patch, 
> HBASE-16783_2.patch
> With ByteBufferPool in place we could avoid the byte[] creation in 
> RpcServer#createHeaderAndMessageBytes and try using the Buffer from the pool 
> rather than creating byte[] every time.

This message was sent by Atlassian JIRA

Reply via email to