avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Cutting (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AVRO-1367) Compiling multiple schemas in a directory fails if dependencies are not in alphabetical order
Date Wed, 28 Aug 2013 20:30:52 GMT

    [ https://issues.apache.org/jira/browse/AVRO-1367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13752811#comment-13752811

Doug Cutting commented on AVRO-1367:

It might be useful to have a parser mode or version that works regardless of dependency order.
 Since schemas in data files, rpc handshakes, etc. must be self-contained, they are probably
most safely parsed by a parser that does not permit forward or external references.  So an
extension that permits forward references should be optional.

As for reasons not to add optional support for forward references, I reference Wikipedia:

"Permitting forward references can greatly increase the complexity and memory requirements
of a compiler, and generally prevents the compiler from being implemented in one pass."

> Compiling multiple schemas in a directory fails if dependencies are not in alphabetical
> ---------------------------------------------------------------------------------------------
>                 Key: AVRO-1367
>                 URL: https://issues.apache.org/jira/browse/AVRO-1367
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.7.6
>            Reporter: Duane Moore
>         Attachments: avro-multiple-schema-directory-failure.diff
> When compiling a schema with multiple input files, no dependencies can be found unless
they are located in a file name that precedes the current file being parsed alphabetically.
 I added two sample test cases to illustrate this using the existing player.avsc and position.avsc
in the test folder.  Simply calling the doCompile using the input directory versus specifying
the files manually, or specifying the input files by name, but in alphabetical order, results
in an error:
> org.apache.avro.SchemaParseException: Undefined name: "Position"

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message