avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@apache.org>
Subject Re: Unknown type java.util.List<java.lang.String> with ReflectData.getSchema
Date Fri, 07 Aug 2009 04:28:43 GMT
tazan007 wrote:
> Yea makes sense.  I am trying to go from Java to Avro :D so I ended up 
> overriding getArraySize, getArrayElements, writeRecord, and writeString 
> from ReflectDatumWriter so I could have it convert String to Utf8, Date 
> to Long, and List to GenericArray. 

Please consider contributing this.  File an issue in Jira and attach the 


> Also had to make some changes to ReflectData's createSchema to support 
> String and Lists  and changed RecordSchema's fieldsToJson to translate 
> Date objects to long.  Basically a cluge but works for getting data out 
> of my Java objects into Avro objects.

Perhaps we should make ReflectData extensible, so that subclasses can 
determine the implementation types?


View raw message