avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeffrey Theobald (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AVRO-1183) Avro Pair fails to initialize when either they key or value is a list.
Date Wed, 14 Nov 2012 01:06:12 GMT

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

Jeffrey Theobald commented on AVRO-1183:
----------------------------------------

Sounds good to me!
                
> Avro Pair fails to initialize when either they key or value is a list.
> ----------------------------------------------------------------------
>
>                 Key: AVRO-1183
>                 URL: https://issues.apache.org/jira/browse/AVRO-1183
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.7.2
>            Reporter: Jeffrey Theobald
>            Assignee: Doug Cutting
>            Priority: Minor
>             Fix For: 1.7.3
>
>         Attachments: AVRO-1183.patch
>
>
> Hello,
> It seems that a change somewhere between 1.5.7 and 1.7.2 (maybe AVRO-966 ?) has broken
the Avro Pair object, so that you can no longer instantiate a pair when either the key or
the value is a list.
> To replicate this bug, try the following:
> {code}
> Integer key = new Integer(0);
> List<Integer> list = new ArrayList<Integer>();
> Pair<Integer, List<Integer>> pair = new Pair<Integer, List<Integer>>(key,
list);
> {code}
> It will produce something like the following exception:
> {noformat}org.apache.avro.AvroRuntimeException: Can't find element type of Collection
> 	at org.apache.avro.reflect.ReflectData.createSchema(ReflectData.java:281)
> 	at org.apache.avro.specific.SpecificData.getSchema(SpecificData.java:151)
> 	at org.apache.avro.mapred.Pair.<init>(Pair.java:312)
>         .....SNIP.....
> {noformat}
> I've used Integer here for illustration but it also affects SpecificRecord objects.

--
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