hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-14020) Unsafe based optimized write in ByteBufferOutputStream
Date Fri, 03 Jul 2015 17:27:04 GMT

    [ 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:

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

> 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

View raw message