You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "chenxu (JIRA)" <ji...@apache.org> on 2019/08/06 15:16:00 UTC
[jira] [Created] (HBASE-22802) Avoid temp ByteBuffer allocation in
FileIOEngine#read
chenxu created HBASE-22802:
------------------------------
Summary: Avoid temp ByteBuffer allocation in FileIOEngine#read
Key: HBASE-22802
URL: https://issues.apache.org/jira/browse/HBASE-22802
Project: HBase
Issue Type: Improvement
Components: BucketCache
Reporter: chenxu
a temp ByteBuffer was allocated each time FileIOEngine#read was called
{code:java}
public Cacheable read(BucketEntry be) throws IOException {
long offset = be.offset();
int length = be.getLength();
Preconditions.checkArgument(length >= 0, "Length of read can not be less than 0.");
ByteBuffer dstBuffer = ByteBuffer.allocate(length);
...
}
{code}
we can avoid this by use of ByteBuffAllocator#allocate(length) after HBASE-21879
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)