Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Avro, mail # user - Correct avsc definition for array of external object's

Copy link to this message
Correct avsc definition for array of external object's
Lewis John Mcgibbney 2013-11-08, 20:19
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/[EMAIL PROTECTED]/msg00799.html

Doug Cutting 2013-11-08, 20:36
Lewis John Mcgibbney 2013-11-08, 20:48
David M. Carr 2013-11-08, 23:44
Lewis John Mcgibbney 2013-11-09, 01:36
Lewis John Mcgibbney 2013-11-08, 20:30