avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 獻輝黃 <klein...@gmail.com>
Subject Re: Sample Prototcol
Date Mon, 28 Sep 2009 00:31:22 GMT
thanks a lot!

I will try it,



2009/9/26 Doug Cutting <cutting@apache.org>

> 獻輝黃 wrote:
>
>> I try to compile the Sample Protocol which on the Specification ,
>>
>> when I use 「java org.apache.avro.specific.SpecificCompiler <
>> http://wiki.apache.org/hadoop/SpecificCompiler>」 to compile it,
>>
>> it show the error message like *「Exception in thread "main"
>> org.apache.avro.SchemaParseException: org.codehaus.ja*
>> *ckson.JsonParseException: Unexpected character ('{' (code 123)): was
>> expecting comma to separate ARRAY entries』*
>>
>
> This is an error in the specification document.
>
> I have filed an issue in Jira for this:
>
>  https://issues.apache.org/jira/browse/AVRO-125
>
> The correct sample protocol is:
>
> {
>  "namespace": "com.acme",
>  "protocol": "HelloWorld",
>
>  "types": [
>    {"name": "Greeting", "type": "record", "fields": [
>      {"name": "message", "type": "string"}]},
>    {"name": "Curse", "type": "error", "fields": [
>      {"name": "message", "type": "string"}]}
>  ],
>
>  "messages": {
>    "hello": {
>      "request": [{"name": "greeting", "type": "Greeting" }],
>      "response": "Greeting",
>      "errors": ["Curse"]
>    }
>  }
> }
>
> Thank you for reporting this.  It will be fixed in the documentation of the
> next Avro release, 1.2.
>
> Doug
>

Mime
View raw message