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

Switch to Plain View
Avro, mail # user - generating specific record with shared common schema


+
Jun Rao 2013-12-30, 19:06
+
ÐΞ€ρ@...) 2014-01-01, 08:42
+
Jun Rao 2014-01-02, 15:44
Copy link to this message
-
Re: generating specific record with shared common schema
David M. Carr 2014-01-02, 16:23
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 <[EMAIL PROTECTED]> 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, ÐΞ€ρ@Ҝ (๏̯͡๏) <[EMAIL PROTECTED]>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 <[EMAIL PROTECTED]> 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
[EMAIL PROTECTED]
+
Jun Rao 2014-01-03, 16:11