[
https://issues.apache.org/jira/browse/HBASE-12358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14214295#comment-14214295
]
ramkrishna.s.vasudevan commented on HBASE-12358:
------------------------------------------------
Before we go about with the patch and the doc, from the code changes we found
that it would be better to go with BRs rather than BBs. And most importantly
for cells backed with BRs we would need the the getXXXBuffer() methods in the
Cell itself so that later in the comparisons and code that tries to do a
comparison with byte[] we could directly call Cell.getXXXBuffer() instead of
checking if the Cell is byte[] backed or it is backed by BR.
This would avoid lot of conditions in the comparator code which is getting used
in almost every where in the read code path.
As Anoop already pointed out for all the filters and exposed APIs the user
might need to use Cell.hasArray() to determine whether to use getXXXArray() or
getXXXBuffer().
We could change every where to BBBackedCell in the read path but that would be
much more bigger change. Or we should go about with a totally new Cell in the
read path that does not extend Cell.
[~anoop.hbase]
Pls add on your points because this step of adding getXXXBuffer() in the Cell
would help to make this simpler.
If we are agreeing to have getXXXBuffer APIs in the Cell then our work would be
bit simplified and would look clean also mainly in the comparators etc.
> Create ByteBuffer backed Cell
> -----------------------------
>
> Key: HBASE-12358
> URL: https://issues.apache.org/jira/browse/HBASE-12358
> Project: HBase
> Issue Type: Sub-task
> Components: regionserver, Scanners
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Attachments: HBASE-12358.patch, HBASE-12358_1.patch,
> HBASE-12358_2.patch
>
>
> As part of HBASE-12224 and HBASE-12282 we wanted a Cell that is backed by BB.
> Changing the core Cell impl would not be needed as it is used in server
> only. So we will create a BB backed Cell and use it in the Server side read
> path. This JIRA just creates an interface that extends Cell and adds the
> needed API.
> The getTimeStamp and getTypebyte() can still refer to the original Cell API
> only. The getXXxOffset() and getXXXLength() can also refer to the original
> Cell only.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)