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

Stack Overflow | user3213495 | 9 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards 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 | 9 months ago | user3213495
    java.lang.Exception: java.lang.ClassCastException: org.apache.avro.generic.GenericData$Record cannot be cast to MyRecord
  2. 0

    Java : Class cast Exception with java and externam API

    Stack Overflow | 5 years ago | Rohit Haritash
    java.lang.ClassCastException: org.apache.hadoop.io.Text cannot be cast to com.somepackage.api.DocR at com.somePackage.AnnotationExtrationMapper.map(AnnotationExtrationMapper.java:1)

    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