[
https://issues.apache.org/jira/browse/HBASE-22159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16808516#comment-16808516
]
Zheng Hu commented on HBASE-22159:
----------------------------------
If not fix this issue, an exception will be thrown:
{code}
2019-04-03 17:10:25,617 WARN [Time-limited test-BucketCacheWriter-0]
bucket.BucketCache$WriterThread(931): Failed doing drain
java.lang.AssertionError
at
org.apache.hadoop.hbase.io.hfile.bucket.ByteBufferIOEngine.write(ByteBufferIOEngine.java:141)
at
org.apache.hadoop.hbase.io.hfile.bucket.BucketCache$RAMQueueEntry.writeToCache(BucketCache.java:1554)
at
org.apache.hadoop.hbase.io.hfile.bucket.BucketCache$WriterThread.doDrain(BucketCache.java:994)
at
org.apache.hadoop.hbase.io.hfile.bucket.BucketCache$WriterThread.run(BucketCache.java:925)
at java.lang.Thread.run(Thread.java:745)
{code}
> 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
>
> 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)