You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@avro.apache.org by Florian Leibert <fl...@leibert.de> on 2009/09/28 05:16:45 UTC

Writing GenericRecords w/o saving the schema information

Hi, firstly, congrats Doug to Avro, I think it fills a gap between Thrift
and GPB, specifically, because I like the fact that it has the
GenericRecord! That's great for prototyping...

I have a question however - I'm trying to use Avro with a Key/Value store -
i.e. I would like to serialize an avro object into the value column. I'd
like to not generate code as my endpoint should actually query a
TypeRegistry in order to resolve the Schema - which would work when using
the GenericRecord - however that also stores the schema when writing via the
GenericDatumWriter (which is a lot of overhead for a K/V store). Therefore,
I wanted to use the SpecificDatumWriter - which can't write a GenericRecord
(for obvious reasons)...

What I am looking for would be something that allows me *not* having to
store the schema in the resulting blob but at the same time it shouldn't
require code generation...

Any clues?

Thanks!

Florian