在运行comand/usr/local/hadoop/bin/hadoop-jar climat.jar maxtemperature sample.txt/out时,在终端上出现错误
> Exception in thread "main" java.lang.Error: Unresolved compilation
> problems: Job cannot be resolved to a type Job cannot be resolved
> to a type FileInputFormat cannot be resolved Path cannot be resolved
> to a type FileOutputFormat cannot be resolved Path cannot be
> resolved to a type Text cannot be resolved to a type IntWritable
> cannot be resolved to a type
>
> at MaxTemperature.main(MaxTemperature.java:15) at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606) at
> org.apache.hadoop.util.RunJar.main(RunJar.java:212)
1条答案
按热度按时间lbsnaicq1#
如果您使用的是1.x,那么在编译map reduce代码时似乎缺少hadoop-core-1.0.4.jar。
hadoop-common-2.2.0.jar和hadoop-mapreduce-client-core-2.2.0.jar,如果您使用hadoop 2.x编写map-reduce代码。
有关详细信息,请按照以下步骤运行wiki字数图reduce代码,并对您的climate jar执行相同的操作:http://hadoop.apache.org/docs/r1.2.1/mapred_tutorial.html