[ https://issues.apache.org/jira/browse/HBASE-16783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15582869#comment-15582869 ]
Anoop Sam John commented on HBASE-16783: ---------------------------------------- {code} this.poolManager.checkSizeAndGrow(extra); 59 // update the curBuf reference in case a new buffer was allocated 60 this.curBuf = this.poolManager.getCurrentBuffer(); 61 } {code} BBLOS method is having this.. I think it is not a clean approach.. The checkSize and managing all writes should be within the BBLOS only.. What we really need is a structure which can separate out bufs from pool and on demand created one.. This class should be able to give buffers when some one ask for one. If available, from pool or else on heap created one. Also to have a close() method or so which can release the bufs to pool (which we got from pool).. But this new class should not be responsible check size and do any sort of writes or so. > 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 > > > 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)