简体   繁体   English

编译Hadoop时出现问题

[英]Problems compiling Hadoop

That's the problem: I have done a simply Hadoop program to "clean" a graph saved in a text file that I will use later (with Hadoop), but I can't compile it! 这就是问题所在:我已经完成了一个简单的Hadoop程序来“清理”保存在文本文件中的图形,稍后将使用该文件(使用Hadoop),但是我无法对其进行编译!

The compiler can't find Hadoop classes (IntWritable, Text ecc...), and each time I get a "cannot find symbol" error. 编译器找不到Hadoop类(IntWritable,Text ecc ...),并且每次出现“找不到符号”错误时,编译器都找不到。

I've tried with: 我尝试过:

javac -classpath path/to/hadoop/root/hadoop-core-{version}.jar filename.java 

I'm running with ubuntu 11.04, and the Hadoop version is 1.0.3. 我使用的是ubuntu 11.04,Hadoop版本是1.0.3。

the problem is that hadoop-core-{version}.jar depends on some other jars. 问题是hadoop-core- {version} .jar依赖于其他一些jar。 You can find all the dependencies on the Maven repository web site : 您可以在Maven存储库网站上找到所有依赖项:

http://mvnrepository.com/artifact/org.apache.hadoop/hadoop-core/1.0.3 http://mvnrepository.com/artifact/org.apache.hadoop/hadoop-core/1.0.3

You should use Maven or add all the dependencies to your project to be able to build it. 您应该使用Maven或将所有依赖项添加到项目中才能进行构建。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM