You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Nick Dimiduk (Jira)" <ji...@apache.org> on 2020/01/23 17:39:00 UTC

[jira] [Updated] (HBASE-22159) ByteBufferIOEngine should support write off-heap ByteBuff to the bufferArray

     [ https://issues.apache.org/jira/browse/HBASE-22159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nick Dimiduk updated HBASE-22159:
---------------------------------
    Fix Version/s: 2.3.0
                   3.0.0

> ByteBufferIOEngine should support write off-heap ByteBuff to the bufferArray
> ----------------------------------------------------------------------------
>
>                 Key: HBASE-22159
>                 URL: https://issues.apache.org/jira/browse/HBASE-22159
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Zheng Hu
>            Assignee: Zheng Hu
>            Priority: Major
>             Fix For: 3.0.0, 2.3.0
>
>         Attachments: HBASE-22159.HBASE-21879.v1.patch, HBASE-22159.HBASE-21879.v2.patch, HBASE-22159.HBASE-21879.v3.patch, HBASE-22159.HBASE-21879.v4.patch, HBASE-22159.HBASE-21879.v5.patch, HBASE-22159.HBASE-21879.v6.patch, HBASE-22159.HBASE-21879.v7.patch
>
>
> In ByteBufferIOEngine , we have the assert: 
> {code}
>   @Override
>   public void write(ByteBuffer srcBuffer, long offset) throws IOException {
>     assert srcBuffer.hasArray();
>     bufferArray.putMultiple(offset, srcBuffer.remaining(), srcBuffer.array(),
>         srcBuffer.arrayOffset());
>   }
>   @Override
>   public void write(ByteBuff srcBuffer, long offset) throws IOException {
>     // When caching block into BucketCache there will be single buffer backing for this HFileBlock.
>     // This will work for now. But from the DFS itself if we get DBB then this may not hold true.
>     assert srcBuffer.hasArray();
>     bufferArray.putMultiple(offset, srcBuffer.remaining(), srcBuffer.array(),
>         srcBuffer.arrayOffset());
>   }
> {code}
> Should remove the assert, and allow to write off-heap ByteBuff to bufferArray.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)