当前位置:Gxlcms > mysql > Linux编译hadoop-cdh4.2.1

Linux编译hadoop-cdh4.2.1

时间:2021-07-01 10:21:17 帮助过:50人阅读

配置 安装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

人气教程排行