You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@avro.apache.org by William McKenzie <ws...@cartewright.com> on 2013/10/16 00:21:57 UTC

avrogencpp and multiple .avsc

Is it possible to generate code for multiple schemas at one time, and
resolve references between them? I tried using an avpr file, and it did not
seem to like that.

thanks,
~Bill

Re: avrogencpp and multiple .avsc

Posted by John Langley <di...@gmail.com>.
Yes, as far as I can tell, the avdl format is not supported in by
avrogencpp it only takes json schema. Sad, but true.


On Wed, Oct 16, 2013 at 10:00 AM, William McKenzie <wsmckenz@cartewright.com
> wrote:

> Thanks,
>
> I was specifically looking for code generators for c++. It looks like the
> avdl format is not supported at all in that implementation?
>
> ~Bill
>
>
> On Tue, Oct 15, 2013 at 5:36 PM, Doug Cutting <cu...@apache.org> wrote:
>
>> On Tue, Oct 15, 2013 at 3:21 PM, William McKenzie
>> <ws...@cartewright.com> wrote:
>> > Is it possible to generate code for multiple schemas at one time, and
>> > resolve references between them?
>>
>> The command line 'compile' tool and maven task both support this.  One
>> can pass multiple schema files on the command line, and each can
>> reference schemas that precede it on the command line.
>>
>> With Maven, you can specify imports.  See
>> https://issues.apache.org/jira/browse/AVRO-1188 for details.
>>
>> > I tried using an avpr file, and it did not seem to like that.
>>
>> With a .avpr file you can place multiple schemas in its "types"
>> section, leaving the messages section empty.
>>
>> With an .avdl file you can import other .avsc, .avpr and .avdl files.
>>
>> http://avro.apache.org/docs/current/idl.html#imports
>>
>> Doug
>>
>
>

Re: avrogencpp and multiple .avsc

Posted by Doug Cutting <cu...@apache.org>.
On Wed, Oct 16, 2013 at 7:00 AM, William McKenzie
<ws...@cartewright.com> wrote:
> I was specifically looking for code generators for c++. It looks like the
> avdl format is not supported at all in that implementation?

The java-based command line tools can be used to convert .avdl files
into .avsc and .avpr files that can then be used for code-generation
using the C++-specific tools.  A separate .avdl compiler for C++ is
not needed.

Doug

Re: avrogencpp and multiple .avsc

Posted by William McKenzie <ws...@cartewright.com>.
Thanks,

I was specifically looking for code generators for c++. It looks like the
avdl format is not supported at all in that implementation?

~Bill


On Tue, Oct 15, 2013 at 5:36 PM, Doug Cutting <cu...@apache.org> wrote:

> On Tue, Oct 15, 2013 at 3:21 PM, William McKenzie
> <ws...@cartewright.com> wrote:
> > Is it possible to generate code for multiple schemas at one time, and
> > resolve references between them?
>
> The command line 'compile' tool and maven task both support this.  One
> can pass multiple schema files on the command line, and each can
> reference schemas that precede it on the command line.
>
> With Maven, you can specify imports.  See
> https://issues.apache.org/jira/browse/AVRO-1188 for details.
>
> > I tried using an avpr file, and it did not seem to like that.
>
> With a .avpr file you can place multiple schemas in its "types"
> section, leaving the messages section empty.
>
> With an .avdl file you can import other .avsc, .avpr and .avdl files.
>
> http://avro.apache.org/docs/current/idl.html#imports
>
> Doug
>

Re: avrogencpp and multiple .avsc

Posted by Doug Cutting <cu...@apache.org>.
On Tue, Oct 15, 2013 at 3:21 PM, William McKenzie
<ws...@cartewright.com> wrote:
> Is it possible to generate code for multiple schemas at one time, and
> resolve references between them?

The command line 'compile' tool and maven task both support this.  One
can pass multiple schema files on the command line, and each can
reference schemas that precede it on the command line.

With Maven, you can specify imports.  See
https://issues.apache.org/jira/browse/AVRO-1188 for details.

> I tried using an avpr file, and it did not seem to like that.

With a .avpr file you can place multiple schemas in its "types"
section, leaving the messages section empty.

With an .avdl file you can import other .avsc, .avpr and .avdl files.

http://avro.apache.org/docs/current/idl.html#imports

Doug