You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Zheng Hu (Jira)" <ji...@apache.org> on 2019/10/17 01:55:00 UTC
[jira] [Resolved] (HBASE-23107) Avoid temp byte array creation when
doing cacheDataOnWrite
[ https://issues.apache.org/jira/browse/HBASE-23107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Zheng Hu resolved HBASE-23107.
------------------------------
Hadoop Flags: Reviewed
Resolution: Fixed
Pushed to branch-2 & master, Thanks [~javaman_chen] for contributing , and thanks all for reviewing & feedback.
> Avoid temp byte array creation when doing cacheDataOnWrite
> ----------------------------------------------------------
>
> Key: HBASE-23107
> URL: https://issues.apache.org/jira/browse/HBASE-23107
> Project: HBase
> Issue Type: Improvement
> Components: BlockCache, HFile
> Reporter: chenxu
> Assignee: chenxu
> Priority: Major
> Labels: gc
> Fix For: 3.0.0, 2.3.0
>
> Attachments: flamegraph_after.svg, flamegraph_before.svg
>
>
> code in HFileBlock.Writer.cloneUncompressedBufferWithHeader
> {code:java}
> ByteBuffer cloneUncompressedBufferWithHeader() {
> expectState(State.BLOCK_READY);
> byte[] uncompressedBlockBytesWithHeader = baosInMemory.toByteArray();
> …
> }
> {code}
> When cacheOnWrite feature enabled, a temp byte array was created in order to copy block’s data, we can avoid this by use of ByteBuffAllocator. This can improve GC performance in write heavy scenarios.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)