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

Anoop Sam John commented on HBASE-17086:
----------------------------------------

Better NOT to mention KV and KV format in Cell..  What we need to say is that 
HBase uses 2 bytes to store cell's tag length. As it is going to be +ve numbers 
always, we save sign bit and so max tags length = 2 * short.MAX +1  Tell the 
number.  So even if the return type is int, the max tags length is less than 
Int.MAX value.

> Add comments to explain why Cell#getTagsLength() returns an int, rather than 
> a short
> ------------------------------------------------------------------------------------
>
>                 Key: HBASE-17086
>                 URL: https://issues.apache.org/jira/browse/HBASE-17086
>             Project: HBase
>          Issue Type: Improvement
>          Components:  Interface
>    Affects Versions: 2.0.0
>            Reporter: Xiang Li
>            Assignee: Xiang Li
>            Priority: Minor
>         Attachments: HBASE-17086.master.000.patch
>
>
> In the Cell interface, getTagsLength() returns a int
> But in the KeyValue implementation, tags length is of 2 bytes. Also in 
> ExtendedCell, when explaining the KeyValue format, tags length is stated to 
> be 2 bytes
> Any plan to update Cell interface to make getTagsLength() returns a short ?



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

Reply via email to