[
https://issues.apache.org/jira/browse/HBASE-16363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15414827#comment-15414827
]
Anoop Sam John commented on HBASE-16363:
----------------------------------------
Qual length can not be max short value seems a copy paste issue in the javadoc
area. So ya the return type of int is correct. When I say it can not be int
max though it is because of HBase specific reason. (Ya there might be some java
specific thing as u see in discussion).. From HBase specific, this is the
issue. We have key length also into KV. When we serialize the cells into
HFiles, then also we write key length. This is of int type. Means it can be
max upto int max value. The key consists of many other things other than this
col qualifier. 2 bytes of rkLen, actual rk bytes, 1 byte of CF len, actual CF
bytes, 8 bytes of timestamp and 1 byte type.. So in effect the qual max
length can be max key length - all other parts sum. You get it now?
> Length of column qualifier in Cell is a short or int
> ----------------------------------------------------
>
> Key: HBASE-16363
> URL: https://issues.apache.org/jira/browse/HBASE-16363
> Project: HBase
> Issue Type: Bug
> Components: documentation
> Reporter: Xiang Li
> Assignee: Xiang Li
> Priority: Minor
>
> In Cell interface
> (hbase-common/src/main/java/org/apache/hadoop/hbase/Cell.java)
> In the comment, we have
> {code}
> /**
> * Contiguous raw bytes that may start at any index in the containing array.
> Max length is
> * Short.MAX_VALUE which is 32,767 bytes.
> * @return The array containing the qualifier bytes.
> */
> {code}
> The length of the qualifier is a short
> But getQualifierLength() returns int
> {code}
> int getQualifierLength();
> {code}
> Which one is correct?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)