avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jun Rao <jun...@gmail.com>
Subject Re: generating specific record with shared common schema
Date Fri, 03 Jan 2014 16:11:06 GMT
Got it. Thanks a lot.

Jun


On Thu, Jan 2, 2014 at 8:23 AM, David M. Carr <david@carrclan.us> wrote:

> I'm doing something similar in my Gradle Avro plugin.  You can see the
> APIs being used here:
>
>
> https://github.com/commercehub-oss/gradle-avro-plugin/blob/de228e79a790db7a3d17482e95cd0b783c8cd6e3/src/main/java/com/commercehub/gradle/plugin/avro/GenerateAvroJavaTask.java#L107
>
>
> On Thu, Jan 2, 2014 at 10:44 AM, Jun Rao <junrao@gmail.com> wrote:
>
>> I am not using maven. What's the underlying Avro api being used?
>>
>> Thanks,
>>
>> Jun
>>
>>
>> On Wed, Jan 1, 2014 at 12:42 AM, ÐΞ€ρ@Ҝ (๏̯͡๏) <deepujain@gmail.com>wrote:
>>
>>> If yours is a Maven project.
>>>
>>> How about using this ?
>>>
>>> <plugin>
>>>
>>> <groupId>org.apache.avro</groupId>
>>>
>>> <artifactId>avro-maven-plugin</artifactId>
>>>
>>> <version>1.7.5</version>
>>>
>>> <executions>
>>>
>>> <execution>
>>>
>>> <phase>generate-sources</phase>
>>>
>>> <goals>
>>>
>>> <goal>schema</goal>
>>>
>>> </goals>
>>>
>>> <configuration>
>>>
>>> <sourceDirectory>${project.basedir}/src/main/resources/avro/</
>>> sourceDirectory>
>>>
>>> </configuration>
>>>
>>> </execution>
>>>
>>> </executions>
>>>
>>> </plugin>
>>>
>>> Regards,
>>>
>>> Deepak
>>>
>>>
>>> On Tue, Dec 31, 2013 at 12:36 AM, Jun Rao <junrao@gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> We have a bunch of avro schema files and want to generate specific
>>>> record for each. All schema files exist in a directory called X. Those
>>>> schema files may reference some common schemas defined in another directory
>>>> called Y. So far, we have been using some of the internal apis such as
>>>> Schema.parse(JsonNode schema, Names names) to achieve this. Is there an
>>>> easy way to achieve this using the public apis?
>>>>
>>>> Thanks,
>>>>
>>>> Jun
>>>>
>>>
>>>
>>>
>>> --
>>> Deepak
>>>
>>>
>>
>
>
> --
> David M. Carr
> david@carrclan.us
>

Mime
View raw message