[
https://issues.apache.org/jira/browse/HDFS-5885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13891573#comment-13891573
]
Todd Lipcon commented on HDFS-5885:
-----------------------------------
As far as I know, the packed=true attribute only applies for primitive fields
(based on my reading of the docs and of the protobuf code).
If we wanted to be extra compact, we could "shred" the BlockProtos into three
separate packed lists of primitives, eg:
{code}
// "Shredded" version of BlockProto, used as a more compact encoding for a list
// of blocks.
message BlockProtoList {
repeated uint64 block_ids = 1 [packed = true];
repeated uint64 gen_stamps = 2 [packed = true];
repeated uint64 sizes = 3 [packed = true];
}
{code}
The gains here are a couple of bytes per block. Think it's worth it?
> Add annotation for repeated fields in the protobuf definition
> -------------------------------------------------------------
>
> Key: HDFS-5885
> URL: https://issues.apache.org/jira/browse/HDFS-5885
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Affects Versions: HDFS-5698 (FSImage in protobuf)
> Reporter: Haohui Mai
> Assignee: Haohui Mai
> Attachments: HDFS-5885.000.patch
>
>
> As suggested by the documentation of Protocol Buffers, the protobuf
> specification of the fsimage should specify [packed=true] for all repeated
> fields.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)