Return-Path: X-Original-To: apmail-avro-user-archive@www.apache.org Delivered-To: apmail-avro-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B349D10187 for ; Thu, 2 Jan 2014 16:23:54 +0000 (UTC) Received: (qmail 949 invoked by uid 500); 2 Jan 2014 16:23:48 -0000 Delivered-To: apmail-avro-user-archive@avro.apache.org Received: (qmail 892 invoked by uid 500); 2 Jan 2014 16:23:48 -0000 Mailing-List: contact user-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@avro.apache.org Delivered-To: mailing list user@avro.apache.org Received: (qmail 874 invoked by uid 99); 2 Jan 2014 16:23:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jan 2014 16:23:46 +0000 X-ASF-Spam-Status: No, hits=2.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,MANY_SPAN_IN_TEXT,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of davidmc24@gmail.com designates 209.85.212.54 as permitted sender) Received: from [209.85.212.54] (HELO mail-vb0-f54.google.com) (209.85.212.54) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jan 2014 16:23:42 +0000 Received: by mail-vb0-f54.google.com with SMTP id g10so7377081vbg.27 for ; Thu, 02 Jan 2014 08:23:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=Md1ycElljnd929tzRg8FHaZ4IifWbNrb4HNco4pY8VA=; b=BcV+nKvf37UO/8KVP3qvh3TUyVRbIDiBWzy98UM569VTMLKH3SMI+7fOwhSFAfewDV 58LYZ6TALHYwlajWEr8CGbINADxAtYh+Ax4I96s33dpAJTF8IyBCWyv4IMmsjV2jtt+c FkC4wyGg1Ym23YLYdLOtXNBx3yTAhRsRZT5DsQGNhFQqqQaMbwlRQPbq51Hch1lFn14o OptNd4iauVGxhzLnBSHZrj5v4r36rgFNzudeV9K++6myzfZ06K8p+t3zocw77Fknk0tH Kcj/dTlDeVuhyGYX1N2gtbm5FK8UwlX9BXe1cT8GjkhjzCg+M8Qm3InfsS9f5qDi2IfU W9Yg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=carrclan.us; s=google; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=Md1ycElljnd929tzRg8FHaZ4IifWbNrb4HNco4pY8VA=; b=A6i1QCedXBZs0LgT2liyh5+7ws/QSpYf+1q0VznjwLsbouvdhEjZZkKEfVHK85oAmA DHOjh9gq5udlig/NOc0AuWMVbXvXs6lK6gF3rlvls+6K8dlMJBs/NdmR7wfZr3Nhdi8R eOhL3T/TDxtphRIrNXy66rEFjzsGbre94nj1U= MIME-Version: 1.0 X-Received: by 10.220.53.135 with SMTP id m7mr47145640vcg.12.1388679801779; Thu, 02 Jan 2014 08:23:21 -0800 (PST) Sender: davidmc24@gmail.com Received: by 10.58.2.229 with HTTP; Thu, 2 Jan 2014 08:23:21 -0800 (PST) In-Reply-To: References: Date: Thu, 2 Jan 2014 11:23:21 -0500 X-Google-Sender-Auth: JIxwqFax10ZgUBzDqXHzLYPYyKc Message-ID: Subject: Re: generating specific record with shared common schema From: "David M. Carr" To: user@avro.apache.org Content-Type: multipart/alternative; boundary=001a1133f8a44abec504eeff36a7 X-Virus-Checked: Checked by ClamAV on apache.org --001a1133f8a44abec504eeff36a7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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/de228e79a790db7a= 3d17482e95cd0b783c8cd6e3/src/main/java/com/commercehub/gradle/plugin/avro/G= enerateAvroJavaTask.java#L107 On Thu, Jan 2, 2014 at 10:44 AM, Jun Rao 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, =C3=90=CE=9E=E2=82=AC=CF=81@=D2=9C (=E0= =B9=8F=CC=AF=CD=A1=E0=B9=8F) wrote: > >> If yours is a Maven project. >> >> How about using this ? >> >> >> >> org.apache.avro >> >> avro-maven-plugin >> >> 1.7.5 >> >> >> >> >> >> generate-sources >> >> >> >> schema >> >> >> >> >> >> ${project.basedir}/src/main/resources/avro/> sourceDirectory> >> >> >> >> >> >> >> >> >> >> Regards, >> >> Deepak >> >> >> On Tue, Dec 31, 2013 at 12:36 AM, Jun Rao 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 direc= tory >>> 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 >> >> > --=20 David M. Carr david@carrclan.us --001a1133f8a44abec504eeff36a7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


O= n Thu, Jan 2, 2014 at 10:44 AM, Jun Rao <junrao@gmail.com> wr= ote:
I am not using maven. What&= #39;s the underlying Avro api being used?

Thanks,
<= div>
Jun


On Wed, Jan 1, 201= 4 at 12:42 AM, =C3=90=CE=9E=E2=82=AC=CF=81@=D2=9C (=E0=B9=8F=CC=AF=CD=A1=E0= =B9=8F) <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>

= <configurat= ion>

<sourceDirectory>${project.basedir}/src/main/resources/= avro/</sourceDirectory>

= </config= uration>

= </executi= on>

= </executio= ns>

= </plugin>

Regards,

Deepak



On Tue, Dec 31, 2013 at 12:36 AM, Jun Rao <junrao@gmail.com>= ; wrote:
Hi,

We h= ave a bunch of avro schema files and want to generate specific record for e= ach. All schema files exist in a directory called X. Those schema files may= reference some common schemas defined in another directory called Y. So fa= r, we have been using some of the internal apis such as Schema.parse(JsonNo= de schema, Names names) to achieve this. Is there an easy way to achieve th= is using the public apis?

Thanks,

Jun



<= font color=3D"#888888">--
Deepak





--
= David M. Carr
dav= id@carrclan.us --001a1133f8a44abec504eeff36a7--