You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2015/07/03 19:27:04 UTC

[jira] [Commented] (HBASE-14020) Unsafe based optimized write in ByteBufferOutputStream

    [ https://issues.apache.org/jira/browse/HBASE-14020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14613328#comment-14613328 ] 

Ted Yu commented on HBASE-14020:
--------------------------------

lgtm
{code}
359	   * for {@code in}. The position and limit of the {@code in} buffer to be set properly by callee.
{code}
'to be set properly by callee' -> 'should be set properly by caller'
{code}
656	   * @param offset offset in the ByteBuffer
{code}
I don't see offset in putInt(ByteBuffer buffer, int val)
{code}
661	      UnsafeAccess.putInt(buffer, buffer.position(), val);
662	      buffer.position(buffer.position() + Bytes.SIZEOF_INT);
{code}
Looks like you can utilize the return value of UnsafeAccess.putInt() in the buffer.position() call.

> Unsafe based optimized write in ByteBufferOutputStream
> ------------------------------------------------------
>
>                 Key: HBASE-14020
>                 URL: https://issues.apache.org/jira/browse/HBASE-14020
>             Project: HBase
>          Issue Type: Sub-task
>          Components: Scanners
>            Reporter: Anoop Sam John
>            Assignee: Anoop Sam John
>             Fix For: 2.0.0
>
>         Attachments: HBASE-14020.patch
>
>
> We use this class to build the cellblock at RPC layer. The write operation is doing puts to java ByteBuffer which is having lot of overhead. Instead we can do Unsafe based copy to buffer operation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)