avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lewis John Mcgibbney <lewis.mcgibb...@gmail.com>
Subject Correct avsc definition for array of external object's
Date Fri, 08 Nov 2013 20:19:54 GMT
Hi Folks,
I am modeling the following Java as JSON in my avsc

/* list of {@link ExtractorSpec}s associated with this product type */
private List<ExtractorSpec> extractors = null;

              "name": "extractors",
              "type": {
                "type": "array",
                "items": "ExtractorSpec"
              "doc": "A list of ExtractorSpecs associated with this product
              "default": null

When I am compiling, as expected I am getting
./bin/gora goracompiler Product.avsc .
Exception in thread "main" org.apache.avro.SchemaParseException: Undefined
name: "ExtractorSpec".

The question I am asking is whether I should embed the ExtractorSpec as a
nested record? Or is there another way such as importing?
I've read a coule of threads [0] relating to IDL but this is not too
appealing as I *just* want my .avsc in JSON. I am trying to keeping things
as easy as possible for users.
I am using Avro 1.7.5 here.
Thank you very much in advance for any feedback.

[0] http://www.mail-archive.com/user@avro.apache.org/msg00799.html


View raw message