Re: Avro 1.7.6 Enums with fields

2014-03-07 Thread Doug Cutting
You can add attributes to the schema, e.g.: {type:enum, name:MyEnum, symbols:[FOO, BAR, BAZ], indexes:[10,11,12], descriptions[foo is..., bar is.., baz is] } Then, if you generate specific code, you can access this with something like: int fooIndex =

Avro 1.7.6 Enums with fields

2014-03-05 Thread Daniel Jue
Hi, I'm kind of new to Avro, and I couldn't find an example on this by googling. I have a Java enum that looks like this: public enum G_CanonicalPropertyType { FOO(10, Foo, foo is not food), BAR(11, Bar, bar is like a snickers), BAZ(12, Baz, baz is a widget with wings); private int index;