Uploaded image for project: 'Spring for Apache Hadoop'
  1. Spring for Apache Hadoop
  2. SHDP-39

If I set mapred.job.tracker in context.xml, wordcount-job will failed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 1.0.0.M1
    • Fix Version/s: 1.0.0.M1
    • Component/s: MR
    • Labels:
      None

      Description

      I have set up a single-node hadoop cluster and I can run MR job successfully.

      If I don't set mapred.job.tracker in context.xml, it will be OK. But If I set it, it will fail with the error message:

      2012-03-06 16:11:46,863 INFO [org.apache.hadoop.mapred.JobClient] - <Task Id : attempt_201203061450_0011_m_000000_0, Status : FAILED>
      java.lang.RuntimeException: java.lang.ClassNotFoundException: org.apache.hadoop.examples.WordCount$TokenizerMapper
      at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:866)
      at org.apache.hadoop.mapreduce.JobContext.getMapperClass(JobContext.java:199)
      at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:738)
      at org.apache.hadoop.mapred.MapTask.run(MapTask.java:370)
      at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:396)
      at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1059)
      at org.apache.hadoop.mapred.Child.main(Child.java:249)
      Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.examples.WordCount$TokenizerMapper
      at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:247)
      at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:819)
      at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:864)

      Did I do something wrong?
      The attachment is the configuration I used.

        Attachments

        1. context.xml
          2 kB
          xinshengjun
        2. hadoop.properties
          0.5 kB
          xinshengjun

          Activity

            People

            Assignee:
            costin Costin Leau
            Reporter:
            redheroin xinshengjun
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: