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

Switch to Threaded View
Avro >> mail # user >> How to handle schema dependencies


Copy link to this message
-
Re: How to handle schema dependencies
We might add a protected Schema.Parser#getName() method so that folks
could subclass Schema.Parser to look for names in the environment,
then use such a subclass in the Maven Mojo implementations.  Please
file an issue in Jira if this is of interest to you.

On Tue, Dec 11, 2012 at 3:47 PM, Steven Willis <[EMAIL PROTECTED]> wrote:
> Hi Doug,
>
> That certainly helps a lot. Though one would still need extra code to pull out the required schema files from a jar into that imports directory prior to code generation. And one would need to track these avro dependencies manually. It would be great if the avro-maven-plugin could have configuration items  specified like "com.example:common" and those artifacts would be searched for compiled avro types using something like the code I posted earlier in addition to the normal parser name resolution.
>
> -Steven Willis
>
>> -----Original Message-----
>> From: Doug Cutting [mailto:[EMAIL PROTECTED]]
>> Sent: Tuesday, December 11, 2012 5:55 PM
>> To: [EMAIL PROTECTED]
>> Subject: Re: How to handle schema dependencies
>>
>> On Tue, Dec 11, 2012 at 1:42 PM, Steven Willis <[EMAIL PROTECTED]>
>> wrote:
>> > It would be nice if during schema parsing we could specify a
>> classpath
>> > to be used for dynamic lookup of external schemas
>>
>> Does AVRO-1188 (included in Avro 1.7.3) help here?
>>
>> https://issues.apache.org/jira/browse/AVRO-1188
>>
>> This permits one to specify directories of schemas to import to Avro
>> Maven executions.
>>
>> Doug