[ 
https://issues.apache.org/jira/browse/HBASE-22090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16836199#comment-16836199
 ] 

Zheng Hu commented on HBASE-22090:
----------------------------------

I plan to commit the patch.v1 to branch HBASE-21879 firstly,  the only concern 
from [~anoop.hbase] & [~ram_krish] is about the heap usage because we 
introduced an new allocator reference in BucketEntry and if use a huge 
BucketCache with FileIOEngine, then it'll consume some heap.  However, we've 
discussed all kinds of ways to balance those but seems have no better way now. 
so commit the patch.v1 firstly,  if any further improvement we can file another 
new issue to accomplish that. 
 

> 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, 
> HBASE-22090.HBASE-21879.v02.patch, HBASE-22090.HBASE-21879.v03.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)

Reply via email to