我是hadoop的新手,并试图运行我的第一个程序。 IDE是eclipse和hadoop版本0.20.2。找不到地图类。我得到以下错误....
13/03/19 00:05:14 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.<br/>
13/03/19 00:05:14 WARN mapred.JobClient: No job jar file set. User classes may not be found. See JobConf(Class) or JobConf#setJar(String).<br/>
13/03/19 00:05:14 INFO input.FileInputFormat: Total input paths to process : 1<br/>
13/03/19 00:05:16 INFO mapred.JobClient: Running job: job_201303182346_0003<br/>
13/03/19 00:05:17 INFO mapred.JobClient: map 0% reduce 0%<br/>
13/03/19 00:05:29 INFO mapred.JobClient: Task Id : attempt_201303182346_0003_m_000000_0, Status : FAILED
java.lang.RuntimeException: java.lang.ClassNotFoundException: gsMapred.MapTaskone
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:809)
at org.apache.hadoop.mapreduce.JobContext.getMapperClass(JobContext.java:157)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:569)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305)
at org.apache.hadoop.mapred.Child.main(Child.java:170)
Caused by: java.lang.ClassNotFoundException: gsMapred.MapTaskone
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:762)
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:807)
... 4 more
您可以查看我的文件here。我真的被困在这里了。谁能说出这里有什么问题?
答案 0 :(得分:1)
您是否尝试过从Eclipse运行MapReduce作业?尝试使用$HADOOP_HOME/bin/hadoop jar <your compiled file>.jar
运行已编译的JAR。