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

Switch to Plain View
Avro, mail # user - C/C++ parsing vs. Java parsing.


+
Saptarshi Guha 2012-06-25, 06:17
Copy link to this message
-
Re: C/C++ parsing vs. Java parsing.
Scott Carey 2012-06-26, 01:42
The schema provided is a union of several schemas.  Java supports parsing
this, C++ may not.  Does it work if you make it one single schema, and
nest "NA", "acomplex" and "retypes" inside of "object" ?  It only needs to
be defined the first time it is referenced.  If it does not, then it is
certainly a bug.

Either way I would file a bug in JIRA.  The spec does not say whether a
file should be parseable if it contains a union rather than a record, but
it probably should be.

-Scott

On 6/24/12 11:17 PM, "Saptarshi Guha" <[EMAIL PROTECTED]> wrote:

>I have a avro scheme found here: http://sguha.pastebin.mozilla.org/1677671
>
>I tried
>
>java -jar avro-tools-1.7.0.jar  compile schema ~/tmp/robject.avro foo
>
>and it worked.
>
>This failed:
>
>avrogencpp --input ~/tmp/robject.avro --output ~/tmp/h2
>Segmentation fault: 11
>
>
>This failed:
>
> avro_schema_t *person_schema >(avro_schema_t*)malloc(sizeof(avro_schema_t));
>(avro_schema_from_json_literal(string.of.avro.file), person_schema)
>
>with
>
>Error was Error parsing JSON: string or '}' expected near end of file
>
>Q1: Does C and C++ API support all schemas the Java one supports?
>Q2: Is it yes to Q1 and this is a bug?
>
>Regards
>Saptarshi
+
Saptarshi Guha 2012-06-26, 02:27
+
Douglas Creager 2012-06-26, 12:02
+
Saptarshi Guha 2012-06-26, 02:45