1 .下载hadoop 0.23版本
git clone .......
git checkout ......
git branch .....
git checkout branch_XX
2. 进入branch目录
查看内容 vi buildXXXX.txt
Build instructions for Hadoop
--------------------------------------------------------------------------------
--
Requirements:
* Unix System
* JDK 1.6
* Maven 3.0
* Findbugs 1.3.9 (if running findbugs)
* ProtocolBuffer 2.4.1+ (for MapReduce)
* Autotools (if compiling native code)
* Internet connection for first build (to fetch all Maven and Hadoop dependencie
s)
--------------------------------------------------------------------------------
3.进入目录
HZ08722@HZ_RD_ZHANGJING /d/hadoop_later/hadoop-common (branch-0.23.9)
安装ProtocolBuffer,使用以下命令编译:
mvn clean install -DskipTests
cd hadoop-mapreduce-project
mvn clean install assembly:assembly -Pnative
中间就是因为没有安装ProtocolBuffer,到处错误。详细见报错原因。
下载地址
https://code.google.com/p/protobuf/downloads/detail?name=protoc-2.5.0-win32.zip
执行mvn clean install -DskipTests 命令的时候,因为我是公司的内网出现很多次jar文件不能够获取到的情况。因此就不一一列举出来。
4.