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

Andrew Purtell commented on HBASE-7414:
---------------------------------------

bq. Since we don't change majorVersion in this patch and 
MINOR_VERSION_NO_CHECKSUM is used to fill up versionToSize array, we would use 
serializeAsWritable() method for majorVersion being 2.

As expected and intended. We need this to find the old fixed V2 length so to 
calculate the proper amount of padding. PB encoding is variable length. 

bq. The above check limits the amount of metadata that can be added using 
protobuf format. How big is padding at the moment ? 

Padding is done to make up the difference between variable PB encoding length 
and the length when encoded as writable under earlier V2 formats.  Failure to 
pad properly or if the PB encoding is too big would mean the trailer wont be 
read in properly by HFile. Right now the amount of padding added is about 100 
bytes (112-124 in tests). That is not pure new headroom, it depends on what is 
the length of the comparator name string. However that does not change. We can 
get a few more int, long, or byte fields in surely. Doing so wont require any 
version updates or special casing of writable methods now. I plan to introduce 
one u8 field in another patch down the road.
                
> Convert some HFile metadata to PB
> ---------------------------------
>
>                 Key: HBASE-7414
>                 URL: https://issues.apache.org/jira/browse/HBASE-7414
>             Project: HBase
>          Issue Type: Task
>          Components: HFile
>            Reporter: stack
>            Assignee: Andrew Purtell
>            Priority: Critical
>             Fix For: 0.96.0
>
>         Attachments: 7414.patch, 7414.patch
>
>
> See HBASE-7201
> Convertion should be in a manner that does not prevent our being able to read 
> old style hfiles with Writable metadata.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to