Description
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:
Integer key = new Integer(0); List<Integer> list = new ArrayList<Integer>(); Pair<Integer, List<Integer>> pair = new Pair<Integer, List<Integer>>(key, list);
It will produce something like the following exception:
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.....
I've used Integer here for illustration but it also affects SpecificRecord objects.