[Root @ master hadoop-0.20.203.0] # bin / hadoop jar hadoop-examples-0.20.203.0.jar wordcount input output01
12/10/24 15:25:05 WARN mapred.JobClient: No job jar file set. User classes may not be found. See JobConf (Class) or JobConf # setJar (String).
12/10/24 15:25:05 INFO input.FileInputFormat: Total input paths to process: 1
12/10/24 15:25:05 INFO mapred.JobClient: Running job: job_201210241517_0001
12/10/24 15:25:06 INFO mapred.JobClient: map 0% reduce 0%
12/10/24 15:25:18 INFO mapred.JobClient: Task Id: attempt_201210241517_0001_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: 195)
at org.apache.hadoop.mapred.MapTask.runNewMapper (MapTask.java: 718)
at org.apache.hadoop.mapred.MapTask.run (MapTask.java: 369)
at org.apache.hadoop.mapred.Child $ 4.run (Child.java: 259)
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: 253)
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)
... 8 more
12/10/24 15:25:25 INFO mapred.JobClient: Task Id: attempt_201210241517_0001_m_000000_1, 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: 195)
at org.apache.hadoop.mapred.MapTask.runNewMapper (MapTask.java: 718)
at org.apache.hadoop.mapred.MapTask.run (MapTask.java: 369)
at org.apache.hadoop.mapred.Child $ 4.run (Child.java: 259)
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: 253)
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)
... 8 more
12/10/24 15:25:32 INFO mapred.JobClient: Task Id: attempt_201210241517_0001_m_000000_2, 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: 195)
at org.apache.hadoop.mapred.MapTask.runNewMapper (MapTask.java: 718)
at org.apache.hadoop.mapred.MapTask.run (MapTask.java: 369)
at org.apache.hadoop.mapred.Child $ 4.run (Child.java: 259)
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: 253)
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)
... 8 more
12/10/24 15:25:44 INFO mapred.JobClient: Job complete: job_201210241517_0001
12/10/24 15:25:44 INFO mapred.JobClient: Counters: 7
12/10/24 15:25:44 INFO mapred.JobClient: Job Counters
12/10/24 15:25:44 INFO mapred.JobClient: SLOTS_MILLIS_MAPS = 24636
12/10/24 15:25:44 INFO mapred.JobClient: Total time spent by all reduces waiting after reserving slots (ms) = 0
12/10/24 15:25:44 INFO mapred.JobClient: Total time spent by all maps waiting after reserving slots (ms) = 0
12/10/24 15:25:44 INFO mapred.JobClient: Launched map tasks = 4
12/10/24 15:25:44 INFO mapred.JobClient: Data-local map tasks = 4
12/10/24 15:25:44 INFO mapred.JobClient: SLOTS_MILLIS_REDUCES = 0
12/10/24 15:25:44 INFO mapred.JobClient: Failed map tasks = 1
Other configurations are correct, why run the unsuccessful?
------ Solution ---------------------------------------- ----
is very obvious way, the package did not find ~ ~ ~
java.lang.RuntimeException: java.lang.ClassNotFoundException: org.apache.hadoop.examples.WordCount $ TokenizerMapper
specific situation is not clear ~ ~ ~ can not see what is too much information
If you need to run this sample, you can run in Eclipse, ~ ~ ~
first configured Hadoop cluster, the cluster run up ~ ~ ~ then the same with the average Java program to run the WordCount program. Note that: 1, WordCount Hadoop will be used in the package, you need to manually import, with the ordinary Java program; 2, upload the data to the HDFS WordCount on Hadoop using basic commands to get; 3, the configuration of what WordCount operating parameters. Run up with the same general procedures ~ ~ ~ You can also see how to write MapReduce programs ~ ~ ~ ~
------ For reference only -------------- -------------------------
should be the missing package
------ For reference only ------ ---------------------------------
is inside hadoop example question, I just want to run a complete an example, always will report this error, what you can specifically say next
------ For reference only ----------------------- ----------------
I reinstall, and normal, but very grateful to you, so give points.
------ For reference only -------------------------------------- -
http://techme.lofter.com/post/ccd6e_1e772b
http://www.cnblogs.com/spork/archive/2010/04/21/1717592.html
I have come across ...... solved ......
没有评论:
发表评论