java.lang.Exception: java.lang.ClassCastException: org.apache.avro.generic.GenericData$Record cannot be cast to MyRecord

Stack Overflow | user3213495 | 7 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Why is my avrokey datum saying it is a Generic Record When I explicitly wrote the data as AvroKey<SpecificRecord>?

    Stack Overflow | 7 months ago | user3213495
    java.lang.Exception: java.lang.ClassCastException: org.apache.avro.generic.GenericData$Record cannot be cast to MyRecord

    Root Cause Analysis

    1. java.lang.ClassCastException

      org.apache.avro.generic.GenericData$Record cannot be cast to MyRecord

      at your.class.path$StatsCalculatorMapper.map()
    2. your.class
      path$StatsCalculatorMapper.map
      1. your.class.path$StatsCalculatorMapper.map(YourSecondJob.java:150)
      2. your.class.path$StatsCalculatorMapper.map(YourSecondJob.java:110)
      2 frames
    3. Hadoop
      Mapper.run
      1. org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:145)
      1 frame