[
https://issues.apache.org/jira/browse/HBASE-12112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14152760#comment-14152760
]
Anoop Sam John commented on HBASE-12112:
----------------------------------------
bq.Add a class comment on CellKey on commit on what it is for.
Sure. This holds the key portion of the Cell. And this is not a Cell as such.
bq.Change this on commit to be getCellKey:
Sure. I missed it.
{quote}
Still need this even though you just added CellKey?
public static Cell createKeyOnlyCell(Cell c, boolean lenAsVal) {
{quote}
The name really not going correct! Because if lenAsVal is true, we add a value
(which is the value length in actual cell). We need a better name. Any
suggestions?
bq.In hfile v2 and v3 where you convert cell to be a cellkey just so you can
toString it, its 'clean' but expensive. I suppose it is fine. Ignore this
remark.
Ya should be fine IMO. This is used only for an error message. The chance for
error is really rare.
> Avoid KeyValueUtil#ensureKeyValue some more simple cases
> --------------------------------------------------------
>
> Key: HBASE-12112
> URL: https://issues.apache.org/jira/browse/HBASE-12112
> Project: HBase
> Issue Type: Sub-task
> Components: regionserver
> Reporter: Anoop Sam John
> Assignee: Anoop Sam John
> Fix For: 2.0.0, 0.99.1
>
> Attachments: HBASE-12112.patch, HBASE-12112_V2.patch,
> HBASE-12112_V2.patch
>
>
> This include fixes with
> - Replace KeyValue#heapSize() with CellUtil#estimatedHeapSizeOf(Cell)
> - Printing the key portion of a cell (rk+cf+q+ts+type). These are in
> Exception messages
> - HFilePrettyPrinter - Avoiding ensureKeyValue() calls and calls to
> cell#getxxx() which involves bytes copying. This is not a hot area still we
> can avoid as much usage of deprecated methods as possible in core code. I
> believe these bytes copying methods are used in many other parts and later we
> can try fixing those as per area importance
> - Creating CellUtil#createKeyOnlyCell and using that in KeyOnlyFilter
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)