So is there richer schema support for java than c++?  I am trying to use
avro RPC as the protocol between a java client and a c++ server.  I was
hoping that I could define the schemas once and generate code for both
platforms.  Is that not possible at the moment?

Thanks!

Shaun

On Wed, Oct 12, 2011 at 2:30 PM, Matt Stevenson
<[email protected]>wrote:

> Sorry, I wasn't paying attention and thought the Java class was json.
>
> Save this as a .json:
>
>> {
>>     "name": "Message", "type": "record",
>>     "fields": [
>>         {"name": "to", "type": "string"},
>>         {"name": "from", "type": "string"},
>>         {"name": "body", "type": "string"}
>>     ]
>> }
>>
>
>
> On Wed, Oct 12, 2011 at 4:27 PM, Matt Stevenson <
> [email protected]> wrote:
>
>> The avrogencpp tool will only parse individual records.
>> If you save
>>
>> record Message {
>>  string to;
>>  string from;
>> string body;
>> }
>>
>> as a .json file, it will generate the class.
>> I think only records are supported in C++ and not full protocols.
>>
>>
>> On Wed, Oct 12, 2011 at 1:37 PM, Shaun Williams 
>> <[email protected]>wrote:
>>
>>> I'm trying to compile the Mail.avpr schema from the avro-rpc-quickstart
>>> example using the c++ tools, and precompile fails with the following error:
>>> "Failed to parse or compile schema: Schema is invalid, due to bad node of
>>> type symbolic."
>>>
>>> I even tried generating the avpr from an avdl, but precompile still fails
>>> with the same error.  Any idea what the problem might be?
>>>
>>> Here's my avdl FYI:
>>>
>>> @namespace("example.proto")
>>> protocol Mail{
>>> record Message {
>>> string to;
>>>  string from;
>>> string body;
>>> }
>>>
>>> string send(Message message);
>>> }
>>>
>>> Thanks!
>>>
>>
>>
>>
>> --
>> Matt Stevenson.
>>
>
>
>
> --
> Matt Stevenson.
>

Reply via email to