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

ramkrishna.s.vasudevan commented on HBASE-14063:
------------------------------------------------

{code}
public ByteBufferedKeyOnlyKeyValue()
{code}
The empty constructor is getting used so that in cases where we use the setKey 
way of changing the key ref on this cell - we create an empty object using the 
empty constructor and setKey to set the references mainly used in cases where 
we need to avoid new object creations.
bq.Why we have to have a OffheapKeyValue? What makes it different from a KV 
other than the assert that it is backed by direct bytebuffer?
OffheapKV extends ByteBufferedCell, that is the main difference between this 
and the normal KV.  So this KV will have the new APIs in ByteBufferedCell for 
referring to the BB underlying these cells.
bq.This is threadsafe? Won't have two threads concurrently trying to do this?
No.  The place where we are using them with the setKey is where the 
HfileScaners are getting created. HFileScanners are always single threaded per 
scan.

> Use BufferBackedCell in read path after HBASE-12213 and HBASE-12295
> -------------------------------------------------------------------
>
>                 Key: HBASE-14063
>                 URL: https://issues.apache.org/jira/browse/HBASE-14063
>             Project: HBase
>          Issue Type: Sub-task
>          Components: regionserver, Scanners
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: ramkrishna.s.vasudevan
>             Fix For: 2.0.0
>
>         Attachments: HBASE-14063.patch, HBASE-14063_1.patch, 
> HBASE-14063_3.patch, HBASE-14063_final.patch
>
>
> Subtask to ensure that the BytebufferBackedCell gets used in the read path 
> after HBASE-12213 and HBASE-12295 goes in.  This would help to clearly change 
> the required places and makes the review easier. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to