[
https://issues.apache.org/jira/browse/HBASE-12313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14184782#comment-14184782
]
Anoop Sam John commented on HBASE-12313:
----------------------------------------
bq.Where we were using estimatedLengthOf (What is this anyways – smile?
Serialized 'length' or size on heap? Or size of the serialized KeyValue byte
array – which is going away), we were talking serialized size. I was thinking
estimatedSerializedSizeOf more appropriate where I did the replaces.
This is mostly used in metric calc now. Some extra bytes is ok there. This is
used in SizedCellScanner size calc also but I can not see this size is really
been used now.
Said it is estimate am ok with the change. Basically the diff btw
estimatedSizeOf and estimatedLengthOf was the former is having and INT size
extra. This is because when we serialize the KV over wire, we write the KV
length (4 bytes) first followed by the kv buffer(KL, VL, Key and Value)
getSumOfKeyElementLengths This is supposed to add the rk, cf, q and ts type
parts but in patch we end up adding value and tags part also. Am I missing some
thing? We need fix this?
> Redo the hfile index length optimization so cell-based rather than serialized
> KV key
> ------------------------------------------------------------------------------------
>
> Key: HBASE-12313
> URL: https://issues.apache.org/jira/browse/HBASE-12313
> Project: HBase
> Issue Type: Sub-task
> Components: regionserver, Scanners
> Reporter: stack
> Assignee: stack
> Attachments:
> 0001-HBASE-12313-Redo-the-hfile-index-length-optimization.patch,
> 0001-HBASE-12313-Redo-the-hfile-index-length-optimization.patch,
> 0001-HBASE-12313-Redo-the-hfile-index-length-optimization.patch,
> 0001-HBASE-12313-Redo-the-hfile-index-length-optimization.patch,
> 0001-HBASE-12313-Redo-the-hfile-index-length-optimization.patch, 12313v5.txt
>
>
> Trying to remove API that returns the 'key' of a KV serialized into a byte
> array is thorny.
> I tried to move over the first and last key serializations and the hfile
> index entries to be cell but patch was turning massive. Here is a smaller
> patch that just redoes the optimization that tries to find 'short' midpoints
> between last key of last block and first key of next block so it is
> Cell-based rather than byte array based (presuming Keys serialized in a
> certain way). Adds unit tests which we didn't have before.
> Also remove CellKey. Not needed... at least not yet. Its just utility for
> toString.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)