0

我正在尝试编译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 文件,但我没有找到正确的。

有任何想法吗?

4

1 回答 1

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
于 2013-10-08T12:09:35.250 回答