https://github.com/apache/hadoop/blob/trunk/BUILDING.txt
配置 eclipse 编译、开发 Hadoop(MapReduce)源代码
http://blog.csdn.net/basicthinker/article/details/6174442
hadoop2.2.0源代码编译
http://my.oschina.net/cloudcoder/blog/192224
Apache Hadoop 源代码编译环境搭建
http://qq85609655.iteye.com/blog/1986991
- Download code from https://codeload.github.com/apache/hadoop/zip/trunk, then unzip it, there is a folder hadoop-trunk.
wget https://codeload.github.com/apache/hadoop/zip/trunk
unzip trunk
- Install native libraries
Ubuntu
sudo apt-get -y install maven build-essential autoconf automake libtool cmake zlib1g-dev pkg-config libssl-dev
Cent OS
yum -y install lzo-devel zlib-devel gcc autoconf automake libtool openssl-devel cmake
get protobuf zip from http://f.dataguru.cn/thread-459689-1-1.html
./configure
make
make check
make install
- $vi /etc/profile
export PROTOC_HOME=/root/java/hadoop-source/protobuf-2.5.0
export PATH=$PATH:$PROTOC_HOME/src
- cd to hadoop-trunk, run
mvn compile -Pnative
- cd to hadoop-maven-plugins, run
mvn install
- cd to hadoop-trunk
mvn install -DskipTests
- Make sure still in hadoop-trunk folder, Build Eclipse project
mvn eclipse:eclipse -DskipTests
- Import the maven project to Eclipse