[
https://issues.apache.org/jira/browse/HBASE-22090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16826855#comment-16826855
]
Zheng Hu commented on HBASE-22090:
----------------------------------
bq. Is it better to have BucketEntry inside BucketCache only so that the bucket
cache can have ref to the allocator ?
Yeah, that should be one possible solution here. but if putting the
BucketEntry as an inner class of BucketCache, the BucketEntry should also
need to maintain an reference to BucketCache at JVM level ? otherwise, how can
the BucketEntry access the member of BucketCache ... I'm not sure how did
JVM implement this, but guess that should also has some overhead.
Another question is: how many BucketEntry are there in your clusters ?
[~ram_krish] & [~anoop.hbase]. As we're using BucketCache in XiaoMi, for 50GB
offheap bucket cache, each block 64KB avg, seems only 50 * 1024 * 1024 * 1024
/ (64 * 1024) = 819200 BucketEntry, the reference overhead shouldn't have any
impact in our clusters. so here, want to known what's the bucketEntry number
in your cluster for evaluating the overhead. (smile)
> The HFileBlock#CacheableDeserializer should pass ByteBuffAllocator to the
> newly created HFileBlock
> --------------------------------------------------------------------------------------------------
>
> Key: HBASE-22090
> URL: https://issues.apache.org/jira/browse/HBASE-22090
> Project: HBase
> Issue Type: Sub-task
> Reporter: Zheng Hu
> Assignee: Zheng Hu
> Priority: Major
> Attachments: HBASE-22090.HBASE-21879.v01.patch
>
>
> In HBASE-22005, we have the following TODO in
> HFileBlock#CacheableDeserializer:
> {code}
> public static final class BlockDeserializer implements
> CacheableDeserializer<Cacheable> {
> private BlockDeserializer() {
> }
> @Override
> public HFileBlock deserialize(ByteBuff buf, boolean reuse, MemoryType
> memType)
> throws IOException {
> // ....
> // TODO make the newly created HFileBlock use the off-heap allocator,
> Need change the
> // deserializer or change the deserialize interface.
> return new HFileBlock(newByteBuff, usesChecksum, memType, offset,
> nextBlockOnDiskSize, null,
> ByteBuffAllocator.HEAP);
> }
> {code}
> Should use the global ByteBuffAllocator here rather than HEAP allocator, as
> the TODO said, we need to adjust the interface of deserializer.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)