Hadoop 2.1.0 beta javac编译错误

时间:2013-10-07 11:10:15

标签: java hadoop

我正在尝试编译http://www.cs.brandeis.edu//~cs147a/lab/hadoop-example-java/中描述的示例,但我收到的错误如下:

MultiFetch.java:107: cannot find symbol
symbol  : class Text
location: class edu.brandeis.cs147a.examples.MultiFetch.Reduce
                           OutputCollector<Text, Text> output,

命令是:

`javac -classpath /opt/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-core-2.1.0-beta.jar -d MultiFetch_classes/ MultiFetch.java` .

我认为我使用了错误的.jar,也尝试过使用其他.jar文件,但我找不到正确的文件。

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

问题解决了。我使用以下命令编译示例:

javac -classpath /opt/hadoop/share/hadoop/common/hadoop-common-2.1.0-beta.jar:/opt/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-core-2.1.0-beta.jar:/opt/hadoop/share/hadoop/mapreduce/lib/hadoop-annotations-2.1.0-beta.jar:/opt/hadoop/share/hadoop/common/lib/commons-cli-1.2.jar  -d MultiFetch_classes/ MultiFetch.java
相关问题