avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Carey <sc...@richrelevance.com>
Subject Re: runtime error when casting Array<String> to String[]
Date Wed, 27 Apr 2011 19:09:02 GMT

On 4/27/11 11:26 AM, "Markus Weimer" <weimer@yahoo-inc.com> wrote:

>> I am working on tools for Avro that will make Alternate object mappings
>>easier.  I hope this will land in 1.6.0.  Custom specific compiled
>>variants will more easily leverage all the work unrelated to object type
>Nice! Will that allow me to have an array of floats in the schema and
>receive it as a float[] in the compiled java class?

It will allow users to create custom mappings easier, one of which might
be that avro arrays that map to java array types instead of List.  A few
basic mapping types might find their way into Avro if they are contributed.

The Specific compiler has been templatized for a while now, and users can
create their own code templates that produces classes as they like, but
writing a custom SpecificDatum(Reader|Writer) requires knowing a lot about
things unrelated to the mapping of Avro types to Java types.

Creating a custom mapping isn't always trivial, but having it be a
separate concern from schema translation and resolution, and low level
encoding/decoding operations will allow for greater code re-use and
modular composition.


View raw message