Linux 编译 hadoop-cdh4.2.1
程序员文章站
2022-03-10 09:41:24
...
配置 安装Maven, Ant, Findbugs, protobuf, cmake 参考:http://cn.soulmachine.me/blog/20140214/ 注意CDH4.2.1需要用protobuf2.4.1编译,否则hadoop-common那里报错 在apache-maven-3.0.5/conf/settings.xml 更改maven镜像 mirror idnexus-osc/id mirrorOfc
配置
安装Maven, Ant, Findbugs, protobuf, cmake
参考:http://cn.soulmachine.me/blog/20140214/
注意CDH4.2.1需要用protobuf2.4.1编译,否则hadoop-common那里报错
在apache-maven-3.0.5/conf/settings.xml 更改maven镜像
nexus-osc central Nexus osc http://maven.oschina.net/content/groups/public/ nexus-spring cdh.repo spring http://repo.spring.io/repo/ nexus-spring2 cdh.releases.repo spring2 http://repo.spring.io/repo/
编译
mvn package -DskipTests -Pdist,native -Dtar
替换jar包
从src/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/target里面拿出mr-app.jar重命名为hadoop-mapreduce-client-app-2.0.0-cdh4.2.1-20140801.jar
cd /opt/cloudera/parcels/CDH/lib/hadoop-mapreduce # 上传jar包 chmod 755 hadoop-mapreduce-client-app-2.0.0-cdh4.2.1-20140801.jar ln -snf hadoop-mapreduce-client-app-2.0.0-cdh4.2.1-20140801.jar hadoop-mapreduce-client-app.jar mv hadoop-mapreduce-client-app-2.0.0-cdh4.2.1.jar /tmp
原文地址:Linux 编译 hadoop-cdh4.2.1, 感谢原作者分享。