avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Cutting (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AVRO-1147) Allow Stringable Map keys in addition to pure String keys (avro reflection)
Date Mon, 10 Sep 2012 21:35:07 GMT

    [ https://issues.apache.org/jira/browse/AVRO-1147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13452465#comment-13452465
] 

Doug Cutting commented on AVRO-1147:
------------------------------------

Sorry, I lost your test changes and used the test I'd written instead in my patch.  If you
like, we can use your tests; please post a patch that includes them instead.

As for adding Integer.class as a stringable, it would be safest to do that with something
like:

ReflectData data = new ReflectData().addStringable(Integer.class);

That way it wouldn't alter the default instance.
                
> Allow Stringable Map keys in addition to pure String keys (avro reflection)
> ---------------------------------------------------------------------------
>
>                 Key: AVRO-1147
>                 URL: https://issues.apache.org/jira/browse/AVRO-1147
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>    Affects Versions: 1.7.0
>            Reporter: Alexandre Normand
>            Assignee: Alexandre Normand
>              Labels: newbie, patch
>         Attachments: AVRO-1147.patch, AVRO-1147.patch
>
>
> I'm using avro reflection for some serialization that doesn't require the best performance
for some short-lived data. 
> However, the object I'm trying to serialize uses a {{Map}} with non-String keys (the
key class is {{Integer}}) and, because of the strict restriction on Map keys being Strings,
it fails. 
> Could we consider allowing Map keys to be *{{Stringable}}* classes (I'm thinking of something
similar to Doug's solution in https://issues.apache.org/jira/browse/AVRO-1146)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message