我正在通过ssh连接一个hadoop集群,它安装了hadoop-2.0.0-mr1-cdh4.0.0版本。有没有办法构建mahout 0.7,使其与这个版本的hadoop兼容?
编辑:由于肖恩的回答,我添加了一些东西
我已更改pom.xml文件,但得到以下结果:
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
missing:
1) org.apache.hadoop:hadoop-core:jar:2.0.0-mr1-cdh4.0.0
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.apache.hadoop -DartifactId=hadoop-core
-Dversion=2.0.0-mr1-cdh4.0.0 -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.apache.hadoop -DartifactId=hadoop-core
-Dversion=2.0.0-mr1-cdh4.0.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url]
-DrepositoryId= [id]
Path to dependency:
1) org.apache.mahout:mahout-core:jar:0.7
2) org.apache.hadoop:hadoop-core:jar:2.0.0-mr1-cdh4.0.0
1 required artifact is missing.
for artifact:
org.apache.mahout:mahout-core:jar:0.7
from the specified remote repositories:
apache.snapshots (http://repository.apache.org/snapshots),
central (http://repo1.maven.org/maven2)
所以我下载了jar文件并成功地构建了它。如何从pom.xml中排除hadoop来构建其他依赖关系?
1条答案
按热度按时间rkue9o1l1#
您只需在maven中将项目的依赖关系更改为依赖于2.0.x工件,然后
mvn package
再一次。我不知道它是否编译兼容,因为这个项目有hadoop0.19.x时代的代码(
.mapred.
)它可能不再被支持了,hadoop0.20.x/1.0.x时代的代码(.mapreduce.
)应该还能用。它是否真的能与hadoop2.0.x一起工作,还不知道。