avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@apache.org>
Subject Re: Correct avsc definition for array of external object's
Date Fri, 08 Nov 2013 20:36:41 GMT
On Fri, Nov 8, 2013 at 12:19 PM, Lewis John Mcgibbney
<lewis.mcgibbney@gmail.com> wrote:
> The question I am asking is whether I should embed the ExtractorSpec as a
> nested record? Or is there another way such as importing?

Nesting would certainly work, but may make things harder to maintain
if you reference the type in several different .avsc files.

Avro's schema parser and compiler supports pre-defining types.  E.g.,
with Avro's command-line .avsc to .java compiler, types in files
defined earlier on the command line can be referenced by types in
files later on the command line.  Similarly, the Java APIs and Maven
integrations support this.  But, from what I can tell, the Gora
compiler does not currently support this (although it would not be
hard to add).

Avro IDL does support imports, so you might use Avro's IDL compiler to
convert .avdl files to .avsc files that expand nested types, then use
the Gora compiler to compile these.

Doug

Mime
View raw message