Zheng Hu created HBASE-22159:
--------------------------------
Summary: 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
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
(v7.6.3#76005)