Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-3965

Spark assembly for hadoop2 contains avro-mapred for hadoop1

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 1.0.2, 1.1.0, 1.2.0
    • None
    • Input/Output
    • None
    • hadoop2, HDP2.1

    Description

      When building Spark assembly for hadoop2, org.apache.avro:avro-mapred for hadoop1 is picked and added to the assembly which leads to following exception at runtime.

      java.lang.IncompatibleClassChangeError: Found interface org.apache.hadoop.mapreduce.TaskAttemptContext, but class was expected
              at org.apache.avro.mapreduce.AvroKeyInputFormat.createRecordReader(AvroKeyInputFormat.java:47)
              at org.apache.spark.rdd.NewHadoopRDD$$anon$1.<init>(NewHadoopRDD.scala:111)
      ...
      

      The patch for SPARK-3039 works well at compile time but artefact's classifier is not applied when assembly is built. I'm not a maven expert but I don't think that classifiers are applied on transitive dependencies.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dajac David Jacot
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: