Skip to content
This repository has been archived by the owner on Jan 22, 2019. It is now read-only.

AvroSchemaGenerator should support generation of "fixed" field-types #15

Closed
joshng opened this issue Nov 15, 2014 · 2 comments
Closed
Milestone

Comments

@joshng
Copy link
Contributor

joshng commented Nov 15, 2014

Values whose byte-lengths are constant are more efficiently to packed in avro as "fixed" fields, because this encoding saves the overhead of a length-prefix. UUIDs and MD5/SHA hashes are common examples where this encoding can be beneficial.

The AvroSchemaGenerator does not currently support this field-type; it just treats byte[]/ByteBuffer fields as length-prefixed "bytes" fields.

Supporting "fixed" will likely involve some sort of annotation in the POJO to specify both the length and "name" of the generated datatype (note that "name" is currently required, for some reason, for every fixed type).

@bkenned4
Copy link

This looks to be fixed with commit 5251e2a. Can this be closed?

@cowtowncoder cowtowncoder added this to the 2.5. milestone Jun 19, 2015
@cowtowncoder
Copy link
Member

Sounds good, will do.

cowtowncoder added a commit that referenced this issue Jun 19, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants