Uploaded image for project: 'MRUnit'
  1. MRUnit
  2. MRUNIT-159

MRUnit not compiling with hadoop 0.23.3

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: 1.0.0
    • Labels:
      None

      Description

      I tried to write test using mrunit 1.0.0 ( i need to init cache, which is unavaliable in already relased versions)

      when I run my code I get:
      java.lang.IncompatibleClassChangeError: Found interface org.apache.hadoop.mapreduce.TaskInputOutputContext, but class was expected
      at org.apache.hadoop.mrunit.internal.mapreduce.AbstractMockContextWrapper.createCommon(AbstractMockContextWrapper.java:53)

      I read other issues like https://issues.apache.org/jira/browse/MRUNIT-56 and decided to recompile mrunit.
      I've downloaded source, and then:

      mvn install -DskipTests
      Build succes

      mvn install -DskipTests -Dhadoop.version=2
      Build success

      tried both output version with my code:
      mrunit-1.0.0-SNAPSHOT-hadoop1.jar
      mrunit-1.0.0-SNAPSHOT-hadoop2.jar

      but was still getting exception

      I've changed pom.xml specificHadoopVersion to:
      <specificHadoopVersion>0.23.3</specificHadoopVersion>

      and then:

      mvn clean
      mvn install -DskipTests -Dhadoop.version=2

      and there are compilation errors:

      [ERROR] COMPILATION ERROR :
      [INFO] -------------------------------------------------------------
      [ERROR] /home/kuba/studia/magisterka/mrunit/src/main/java/org/apache/hadoop/mrunit/TestDriver.java:[464,24] error: cannot find symbol
      [ERROR] class DistributedCache
      /home/kuba/studia/magisterka/mrunit/src/main/java/org/apache/hadoop/mrunit/TestDriver.java:[478,24] error: cannot find symbol
      [INFO] 2 errors

      that's because initDistributedCache method uses DistributedCache.addLocalFiles(), which is unavaliable in Hadoop 0.23.3

      I tried to fix it, but I'm new to hadoop ant havent succeed yet, any help, please?

        Attachments

          Activity

            People

            • Assignee:
              dbeech Dave Beech
              Reporter:
              pawloch Jakub
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: