[
https://issues.apache.org/jira/browse/HBASE-22531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16874114#comment-16874114
]
Hudson commented on HBASE-22531:
--------------------------------
Results for branch branch-2
[build #2029 on
builds.a.o|https://builds.apache.org/job/HBase%20Nightly/job/branch-2/2029/]:
(x) *{color:red}-1 overall{color}*
----
details (if available):
(x) {color:red}-1 general checks{color}
-- For more information [see general
report|https://builds.apache.org/job/HBase%20Nightly/job/branch-2/2029//General_Nightly_Build_Report/]
(x) {color:red}-1 jdk8 hadoop2 checks{color}
-- For more information [see jdk8 (hadoop2)
report|https://builds.apache.org/job/HBase%20Nightly/job/branch-2/2029//JDK8_Nightly_Build_Report_(Hadoop2)/]
(x) {color:red}-1 jdk8 hadoop3 checks{color}
-- For more information [see jdk8 (hadoop3)
report|https://builds.apache.org/job/HBase%20Nightly/job/branch-2/2029//JDK8_Nightly_Build_Report_(Hadoop3)/]
(/) {color:green}+1 source release artifact{color}
-- See build output for details.
(/) {color:green}+1 client integration test{color}
> The HFileReaderImpl#shouldUseHeap return the incorrect true when disabled
> BlockCache
> -------------------------------------------------------------------------------------
>
> Key: HBASE-22531
> URL: https://issues.apache.org/jira/browse/HBASE-22531
> Project: HBase
> Issue Type: Sub-task
> Reporter: Zheng Hu
> Assignee: Zheng Hu
> Priority: Major
> Attachments: HBASE-22531.HBASE-21879.v1.patch,
> async-prof-pid-13311-alloc-4.svg, async-prof-pid-8590-alloc-2.svg
>
>
> I'm having a benchmark with block cache disabled for HBASE-21879 branch.
> Just caurious about why still so many heap allocation in the heap allocation
> flame graph [async-prof-pid-13311-alloc-4.svg |
> https://issues.apache.org/jira/secure/attachment/12970648/async-prof-pid-13311-alloc-4.svg],
> actually, I've set the following config, which means all allocation should
> be offheap, while it's not:
> {code}
> # Disable the block cache
> hfile.block.cache.size=0
> hbase.ipc.server.reservoir.minimal.allocating.size=0 # Let all allocation
> from pooled allocator.
> {code}
> Checked the code, I found the problem here:
> {code}
> private boolean shouldUseHeap(BlockType expectedBlockType) {
> if (cacheConf.getBlockCache() == null) {
> return false;
> } else if (!cacheConf.isCombinedBlockCache()) {
> // Block to cache in LruBlockCache must be an heap one. So just
> allocate block memory from
> // heap for saving an extra off-heap to heap copying.
> return true;
> }
> return expectedBlockType != null && !expectedBlockType.isData();
> }
> {code}
> Say, the CacheConfig#getBlockCache will return a Optional<BlockCache>,
> which is always non-null:
> {code}
> /**
> * Returns the block cache.
> *
> * @return the block cache, or null if caching is completely disabled
> */
> public Optional<BlockCache> getBlockCache() {
> return Optional.ofNullable(this.blockCache);
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)