[
https://issues.apache.org/jira/browse/HBASE-9359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13762332#comment-13762332
]
Jonathan Hsieh commented on HBASE-9359:
---------------------------------------
[~sershe] the 0.96 mechanism I saw most commonly used in the unit tests was the
KV#getValue, KV#getRow, KV#getColumn, and KV#getFamily methods. These all
allocate new buffers and make copies. In the 0.96 interface of Cell, I added
these methods with the same semantics but marked as deprecated (since it is
inefficient). In 0.96 I've also added CellUtil#getValueArray,
CellUtil#getRowArray, CellUtil#getColumnArray, and CellUtil#getFAmilyArray
which have the byte allocate and copying semantics.
Applications concerned about performance (avoiding copies when references will
do) over legibility would have to be "pointer aware" could read directly from
the Cell#get*Array (careful, this actually acts more like a pointer than an
array, and is assumed but not enforced to be immutable) using Cell#get*Offset
as a index into the pointer and Cell#get*Length as a bounds check.
> Convert KeyValue to Cell in hbase-client module - Result/Put/Delete,
> ColumnInterpreter
> --------------------------------------------------------------------------------------
>
> Key: HBASE-9359
> URL: https://issues.apache.org/jira/browse/HBASE-9359
> Project: HBase
> Issue Type: Sub-task
> Components: Client
> Affects Versions: 0.95.2
> Reporter: Jonathan Hsieh
> Assignee: Jonathan Hsieh
> Fix For: 0.98.0, 0.96.0
>
> Attachments: hbase-9334-9359.v4.patch, hbase-9359-9334.v5.patch,
> hbase-9359-9334.v6.patch, hbase-9359.patch, hbase-9359.v2.patch,
> hbase-9359.v3.patch, hbase-9359.v5.patch, hbase-9359.v6.patch
>
>
> This path is the second half of eliminating KeyValue from the client
> interfaces. This percolated through quite a bit.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira