[
https://issues.apache.org/jira/browse/HBASE-16783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15602524#comment-15602524
]
stack commented on HBASE-16783:
-------------------------------
Can you hid this stuff...
(cellBlockSize > 0) ? cellBlock.get(cellBlock.size() - 1) : null;
... inside createHeaderAndMessageBytes? It doesn't look like it needs to be
ahead of Message header = headerBuilder.build(); or be mentioned in this
method body (am I reading it right)?
A high-level comment in here:
if (possiblePBBuf != null) {
... and what you are generally doing (reusing a buffer if there is room for
current request?) would help those coming after reading code.
Otherwise patch looks smart, much better/clearer now. Nice [~ram_krish]
> 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, HBASE-16783_3.patch, HBASE-16783_4.patch,
> HBASE-16783_5.patch, HBASE-16783_6.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
(v6.3.4#6332)