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

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

bq.int write(OutputStream out, boolean withTags, boolean withLengthHeader)
It might be odd to pass this boolean.. Even withTags we plan to remove.
Intentionally it was removed that the oswrite within Cell impl write the length 
of the cell.  Whether the length to be written or no is up to the caller.  In 
case of HFIle write we dont need to write the length. In case of KVCodec we 
need it.  Some other codec may come tomorrow which want to write the length not 
as an int but as a varint.   So IMO it is better to leave it and not club the 
length write part within write method in Cell. Got ur point of one extra calc 
but it is ok.

> Write length header inside KeyValueUtil#oswrite
> -----------------------------------------------
>
>                 Key: HBASE-16817
>                 URL: https://issues.apache.org/jira/browse/HBASE-16817
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: binlijin
>            Priority: Minor
>         Attachments: HBASE-16817_master.patch
>
>
> Current we write length header before KeyValueUtil#oswrite, it is more 
> efficient to  write length header inside it, so we only to calculate the 
> length only once.



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

Reply via email to