avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fengyun RAO <raofeng...@gmail.com>
Subject How to dynamically create a MapSchema with "String" as key, not "Utf8"
Date Mon, 19 May 2014 08:07:43 GMT
I've noticed the jira page: https://issues.apache.org/jira/browse/AVRO-803,
and known how to generate a Map<String, MyType> class using a schema file.

In my case, the schema file is “MyType.avsc”, and I used avro-tools to
generate a "MyType.java" class,
My question is how to dynamically create a MapSchema of Map<String,
MyType>, since I have to Ser/De a Map<String, MyType>.

I tried to use the method Schema.createMap(Schema myType), but the key is
"Utf8" not "String".

View raw message