C++ interface, json, schema, immuatability

2017-07-06 Thread Dan Schmitt
I was hoping I wasn't doing something complex, but I may be wrong. My goal state is to allow callers to send arbitrary avro buffers to me, and then merge them into a schema. I seem to be stuck in that the exposed methods to extract the schema from the buffer/stream etc result in a ValidSchema,

Re: Avro schema properties contention on multithread read

2017-07-06 Thread fady
On 05.07.2017 21:53, Zoltan Farkas wrote: > The synchronization in JsonProperties is curently inconsistent (see > getObjectProps()) which makes current implementation @NotThreadSafe > > I think it would be probably best to remove synchronization from those > methods... and add @NotThreadSafe

RE: Impossible to start an union with a named type

2017-07-06 Thread Tony Imbault
Thank you Nandor, I had already done this test, but in my context it is very important to respect the specified order. In my opinion the class SchemaBuilder.UnionFieldTypeBuilder should provide the methods type(name), type (name, namespace) and type(schemaType). I will check if a jira already

Re: Impossible to start an union with a named type

2017-07-06 Thread Nandor Kollar
Hi Tony, If you change the order of elements in the author field, it is fine: @Test public void testUnion() { Schema schema = SchemaBuilder .unionOf() .record("Author") .fields() .name("name").type().stringType().noDefault() .name("birthday").type().longType().noDefault()

Impossible to start an union with a named type

2017-07-06 Thread Tony Imbault
Hi everybody, i am trying to build the followong JSON schema: [{ "type": "record", "name": "Author", "fields": [{ "name": "name", "type": "string" }, { "name": "birthday", "type": "long" }] }, { "type": "record",