I'm using UnpackedAvroSource in my scalding job with intentions to use GenericData (I worked around the hashCode bug of AvroScheme)
at com.l.g.event.put(LPEvent.java:60)
at org.apache.avro.generic.GenericData.setField(GenericData.java:530)
at org.apache.avro.generic.GenericData.setField(GenericData.java:547)
at org.apache.avro.generic.GenericDatumReader.readRecord(GenericDatumReader.java:177)
at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:148)
at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:139)
at org.apache.avro.file.DataFileStream.next(DataFileStream.java:233)
Why is the GenericDatumReader attempts to set a field on com.l.g.event and not on GenericData$Record ?? That is the entire point of using generics.
I did not explicitly set this class anywhere - the only thing I can think of is that it realizes the existence of the object from the avro data itself (using namespace: and name: attributes)
My code is simple as :
UnpackedAvroSource[Tuple](avroPaths, schema).read
.mapTo('event-> 'header) { audHeaders: util.ArrayList[Tuple] => ... }