Compile Hadoop Source Code
編譯步驟
基本訊息
- OS: CentOS 6.5 64bit
- Hadoop: 2.8.1
- JDK: 8u144
- Maven: 3.3.9
- ProtocolBuffer: 2.5.0
- Findbugs: 1.3.9
設置Hadoop目錄
- Hadoop source code:
- Hadoop官網下載
1234567891011121314151617181920212223242526272829303132[root@hadoop-01 ~]# cd /opt/sourcecode/[root@hadoop-01 sourcecode]# lshadoop-2.8.1-src.tar.gz ## 已下載的hadoop 2.8.1 source code壓縮包[root@hadoop-01 sourcecode]# tar -xzvf hadoop-2.8.1-src.tar.gz[root@hadoop-01 sourcecode]# lshadoop-2.8.1-srchadoop-2.8.1-src.tar.gz[root@hadoop-01 sourcecode]# cd hadoop-2.8.1-src[root@hadoop-01 hadoop-2.8.1-src]# lltotal 228-rw-rw-r--. 1 root root 15623 May 24 07:14 BUILDING.txtdrwxr-xr-x. 4 root root 4096 Aug 21 00:38 dev-supportdrwxr-xr-x. 4 root root 4096 Aug 21 02:01 hadoop-assembliesdrwxr-xr-x. 4 root root 4096 Aug 21 02:01 hadoop-build-toolsdrwxrwxr-x. 3 root root 4096 Aug 21 02:13 hadoop-clientdrwxr-xr-x. 11 root root 4096 Aug 21 02:04 hadoop-common-projectdrwxr-xr-x. 3 root root 4096 Aug 21 02:13 hadoop-distdrwxr-xr-x. 9 root root 4096 Aug 21 02:07 hadoop-hdfs-projectdrwxr-xr-x. 10 root root 4096 Aug 21 02:11 hadoop-mapreduce-projectdrwxr-xr-x. 4 root root 4096 Aug 21 02:01 hadoop-maven-pluginsdrwxr-xr-x. 3 root root 4096 Aug 21 02:13 hadoop-miniclusterdrwxr-xr-x. 4 root root 4096 Aug 21 02:01 hadoop-projectdrwxr-xr-x. 3 root root 4096 Aug 21 02:01 hadoop-project-distdrwxr-xr-x. 19 root root 4096 Aug 21 02:13 hadoop-toolsdrwxr-xr-x. 4 root root 4096 Aug 21 02:09 hadoop-yarn-project-rw-rw-r--. 1 root root 99253 May 24 07:14 LICENSE.txt-rw-------. 1 root root 289 Aug 21 00:45 nohup.out-rw-rw-r--. 1 root root 15915 May 24 07:14 NOTICE.txtdrwxrwxr-x. 2 root root 4096 Jun 2 14:24 patchprocess-rw-rw-r--. 1 root root 20477 May 29 06:36 pom.xml-rw-r--r--. 1 root root 1366 May 20 13:30 README.txt-rwxrwxr-x. 1 root root 1841 May 24 07:14 start-build-env.sh
- Hadoop官網下載
BUILDING.txt文件中列出編譯的基本需求,以及編譯時需要注意的地方,可以在編譯的過程中對照著看。
Java的安裝與配置
|
|
Maven的安裝與配置
|
|
Autoconf的安裝
|
|
Automake的安裝
|
|
Protobuf安装
|
|
Findbugs安装
|
|
安装其他依賴
|
|
進行編譯
|
|