大家好,欢迎来到IT知识分享网。
在tez编译过程中会遇到各种各样的问题,如果你是编译0.5的,因为0.5中没有tez-ui所以编译过程中基本没有什么问题,
先准备环境
1、linux 环境,我的是centos6.4 32位的
2、可编译的maven环境 我这边用得maven3.3.9的环境
3、protoc的版本是2.5.0
4、需要安装nodejs npm bower git
protoc版本
[root@localhost bin]# protoc –version
libprotoc 2.5.0
maven版本:
[root@localhost bin]# mvn -v
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T08:41:47-08:00)
Maven home: /root/app/apache-maven-3.3.9
Java version: 1.7.0_75, vendor: Oracle Corporation
Java home: /usr/bin/jdk1.7.0_75/jre
Default locale: en_US, platform encoding: UTF-8
OS name: “linux”, version: “2.6.32-358.el6.i686”, arch: “i386”, family: “unix”
安装nodejs
#yum -y install gcc make gcc-c++ openssl
#wget http://nodejs.org/dist/v0.10.26/node-v0.10.26.tar.gz
#tar -zxvf node-v0.10.26.tar.gz
# make && make install
# node -v v0.10.26
在安装完成nodejs以后就可以用下面命令安装npm
安装npm
curl -L https://www.npmjs.com/install.sh | sh
如果执行node -v和npm -v能看到版本就说明安装成功了
[root@localhost ~]# node -v
v0.10.26
[root@localhost ~]# npm -v
3.8.3
安装bower
npm -g install bower
执行下面命令如果提示了如下命令说明bower安装成功。中这个错误提示的是root用户不能执行bower install 命令
如果需要安装 需要加 –allow-root命令
[root@localhost bin]# bower install
bower ESUDO Cannot be run with sudo
Additional error details:
Since bower is a user command, there is no need to execute it with superuser permissions.
If you’re having permission errors when using bower without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs.
http://www.joyent.com/blog/installing-node-and-npm
https://gist.github.com/isaacs/579814
You can however run a command with sudo using –allow-root option
安装git
我是用yum安装 但是git的版本比较老了,所以我们在安装git之前需要更新yum
1、首先更新yum
sudo yum update
2、安装依赖的包
sudo yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
3、下载git源码并解压缩
wget https://github.com/git/git/archive/v2.3.0.zip
unzip v2.3.0.zip
cd git-2.3.0
4、编译安装 将其安装在“/usr/local/git”目录下。
make prefix=/usr/local/git all
sudo make prefix=/usr/local/git install
5、修改 /etc/profile文件
将PATH中增加 /usr/local/git/bin 这个路径 ,并且生效 source /etc/profile
如果执行 git –version能查看到版本号说明已经安装成功了
[root@localhost tez-ui]# git –version
git version 2.3.0
以上的maven protoc nodeje npm bower git是需要安装的软件。
修改pom.xml文件,在tez-ui目录下面有一个pom.xml文件,我们需要对其进行修改,因为如果是root用户编译的时候
执行bower install会出错,所以我们需要在中间加一个参数
<argument>--allow-root</argument>
<arguments>
<argument>node_modules/bower/bin/bower</argument>
<argument>install</argument>
<argument>--allow-root</argument>
<argument>--remove-unnecessary-resolutions=false</argument>
</arguments>
编译的命令 mvn clean package -DskipTests=true -Dmaven.javadoc.skip=true
编译成功的包会放在tez-dist/target 目录下面
[root@localhost target]# pwd
/root/app/apache-tez-0.7.0-src/tez-dist/target
[root@localhost target]# ls
archive-tmp maven-archiver tez-0.7.0 tez-0.7.0-minimal.tar.gz tez-0.7.0.tar.gz tez-dist-0.7.0-tests.jar
0.7的日志
[INFO] Building jar: /root/app/apache-tez-0.7.0-src/docs/target/tez-docs-0.7.0-tests.jar
[INFO] ————————————————————————
[INFO] Reactor Summary:
[INFO]
[INFO] tez ………………………………………… SUCCESS [ 1.236 s]
[INFO] tez-api …………………………………….. SUCCESS [ 13.715 s]
[INFO] tez-common ………………………………….. SUCCESS [ 0.710 s]
[INFO] tez-runtime-internals ………………………… SUCCESS [ 1.094 s]
[INFO] tez-runtime-library ………………………….. SUCCESS [ 3.538 s]
[INFO] tez-mapreduce ……………………………….. SUCCESS [ 2.382 s]
[INFO] tez-examples ………………………………… SUCCESS [ 0.798 s]
[INFO] tez-dag …………………………………….. SUCCESS [ 6.236 s]
[INFO] tez-tests …………………………………… SUCCESS [ 1.917 s]
[INFO] tez-ui ……………………………………… SUCCESS [06:58 min]
[INFO] tez-plugins …………………………………. SUCCESS [ 0.042 s]
[INFO] tez-yarn-timeline-history …………………….. SUCCESS [ 1.085 s]
[INFO] tez-yarn-timeline-history-with-acls ……………. SUCCESS [ 0.554 s]
[INFO] tez-mbeans-resource-calculator ………………… SUCCESS [ 0.292 s]
[INFO] tez-tools …………………………………… SUCCESS [ 0.036 s]
[INFO] tez-dist ……………………………………. SUCCESS [ 26.874 s]
[INFO] Tez ………………………………………… SUCCESS [ 0.028 s]
[INFO] ————————————————————————
[INFO] BUILD SUCCESS
[INFO] ————————————————————————
[INFO] Total time: 07:59 min
[INFO] Finished at: 2016-03-30T08:28:11-07:00
[INFO] Final Memory: 62M/346M
[INFO] ————————————————————————
0.8的日志
[INFO] Building jar: /root/app/apache-tez-0.8.2-src/docs/target/tez-docs-0.8.2-tests.jar
[INFO] ————————————————————————
[INFO] Reactor Summary:
[INFO]
[INFO] tez ………………………………………… SUCCESS [ 2.120 s]
[INFO] hadoop-shim …………………………………. SUCCESS [ 2.198 s]
[INFO] tez-api …………………………………….. SUCCESS [ 11.062 s]
[INFO] tez-common ………………………………….. SUCCESS [ 0.713 s]
[INFO] tez-runtime-internals ………………………… SUCCESS [ 1.419 s]
[INFO] tez-runtime-library ………………………….. SUCCESS [ 3.307 s]
[INFO] tez-mapreduce ……………………………….. SUCCESS [ 1.823 s]
[INFO] tez-examples ………………………………… SUCCESS [ 0.443 s]
[INFO] tez-dag …………………………………….. SUCCESS [ 5.467 s]
[INFO] tez-tests …………………………………… SUCCESS [ 1.597 s]
[INFO] tez-ext-service-tests ………………………… SUCCESS [ 0.929 s]
[INFO] tez-ui ……………………………………… SUCCESS [01:41 min]
[INFO] tez-plugins …………………………………. SUCCESS [ 0.041 s]
[INFO] tez-yarn-timeline-history …………………….. SUCCESS [ 1.027 s]
[INFO] tez-yarn-timeline-history-with-acls ……………. SUCCESS [ 0.527 s]
[INFO] tez-history-parser …………………………… SUCCESS [ 29.062 s]
[INFO] tez-tools …………………………………… SUCCESS [ 0.050 s]
[INFO] tez-perf-analyzer ……………………………. SUCCESS [ 0.036 s]
[INFO] tez-job-analyzer …………………………….. SUCCESS [ 11.957 s]
[INFO] tez-javadoc-tools ……………………………. SUCCESS [ 0.224 s]
[INFO] hadoop-shim-impls ……………………………. SUCCESS [ 0.054 s]
[INFO] hadoop-shim-2.6 ……………………………… SUCCESS [ 0.149 s]
[INFO] tez-dist ……………………………………. SUCCESS [ 29.282 s]
[INFO] Tez ………………………………………… SUCCESS [ 0.029 s]
[INFO] ————————————————————————
[INFO] BUILD SUCCESS
[INFO] ————————————————————————
[INFO] Total time: 03:26 min
[INFO] Finished at: 2016-03-30T08:34:18-07:00
[INFO] Final Memory: 76M/439M
[INFO] ————————————————————————
免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://yundeesoft.com/24729.html