hadoop2.2.0源码编译笔记
来源:互联网 发布:linux移动目录命令 编辑:程序博客网 时间:2024/06/05 19:37
sudo apt-get install g++ autoconf automake libtool make cmake zlib1g-dev pkg-config libssl-dev
sudo apt-get install ssh
sudo apt-get install protobuf-compiler
sudo apt-get install maven
进入 hadoop-2.2.0-src 目录
mvn package -Pdist,native -DskipTests -Dtar
如果在编译时出现如下的错误:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:29.469s
[INFO] Finished at: Mon Nov 18 12:30:36 PST 2013
[INFO] Final Memory: 37M/120M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile (default-testCompile) on project hadoop-auth: Compilation failure: Compilation failure:
[ERROR] /home/chuan/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/AuthenticatorTestCase.java:[84,13] cannot access org.mortbay.component.AbstractLifeCycle
[ERROR] class file for org.mortbay.component.AbstractLifeCycle not found
[ERROR] server = new Server(0);
[ERROR] /home/chuan/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/AuthenticatorTestCase.java:[94,29] cannot access org.mortbay.component.LifeCycle
[ERROR] class file for org.mortbay.component.LifeCycle not found
[ERROR] server.getConnectors()[0].setHost(host);
[ERROR] /home/chuan/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/AuthenticatorTestCase.java:[96,10] cannot find symbol
[ERROR] symbol : method start()
[ERROR] location: class org.mortbay.jetty.Server
[ERROR] /home/chuan/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/AuthenticatorTestCase.java:[102,12] cannot find symbol
[ERROR] symbol : method stop()
目前的2.2.0 的Source Code 压缩包解压出来的code有个bug 需要patch后才能编译。否则编译hadoop-auth 会提示上面错误。
解决办法如下:
修改下面的pom文件。该文件在hadoop源码包下寻找:
hadoop-common-project/hadoop-auth/pom.xml
打开上面的的pom文件,在56行加入如下的依赖:
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-util</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<scope>test</scope>
</dependency>
重新编译
编译好的文件位于 hadoop-2.2.0-src/hadoop-dist/target/hadoop-2.2.0/ 目录中
sudo apt-get install ssh
sudo apt-get install protobuf-compiler
sudo apt-get install maven
进入 hadoop-2.2.0-src 目录
mvn package -Pdist,native -DskipTests -Dtar
如果在编译时出现如下的错误:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:29.469s
[INFO] Finished at: Mon Nov 18 12:30:36 PST 2013
[INFO] Final Memory: 37M/120M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile (default-testCompile) on project hadoop-auth: Compilation failure: Compilation failure:
[ERROR] /home/chuan/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/AuthenticatorTestCase.java:[84,13] cannot access org.mortbay.component.AbstractLifeCycle
[ERROR] class file for org.mortbay.component.AbstractLifeCycle not found
[ERROR] server = new Server(0);
[ERROR] /home/chuan/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/AuthenticatorTestCase.java:[94,29] cannot access org.mortbay.component.LifeCycle
[ERROR] class file for org.mortbay.component.LifeCycle not found
[ERROR] server.getConnectors()[0].setHost(host);
[ERROR] /home/chuan/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/AuthenticatorTestCase.java:[96,10] cannot find symbol
[ERROR] symbol : method start()
[ERROR] location: class org.mortbay.jetty.Server
[ERROR] /home/chuan/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/AuthenticatorTestCase.java:[102,12] cannot find symbol
[ERROR] symbol : method stop()
目前的2.2.0 的Source Code 压缩包解压出来的code有个bug 需要patch后才能编译。否则编译hadoop-auth 会提示上面错误。
解决办法如下:
修改下面的pom文件。该文件在hadoop源码包下寻找:
hadoop-common-project/hadoop-auth/pom.xml
打开上面的的pom文件,在56行加入如下的依赖:
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-util</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<scope>test</scope>
</dependency>
重新编译
编译好的文件位于 hadoop-2.2.0-src/hadoop-dist/target/hadoop-2.2.0/ 目录中
0 0
- hadoop2.2.0源码编译笔记
- 编译hadoop2.2.0源码
- hadoop2.2.0源码编译
- hadoop2.2.0源码编译
- Hadoop2.2.0源码编译
- hadoop2.2.0源码编译(ubuntu)
- hadoop2.2.0源码编译(eclipse)
- hadoop2.2.0源码编译(ubuntu下)
- centos下hadoop2.2.0源码编译
- hadoop2.2.0源码编译(CentOS6.4)
- hadoop2.2.0 源码编译 常见错误
- hadoop2.2.0源码编译(CentOS6.4)
- hadoop2.2 源码编译
- hadoop2.4.0源码编译
- Hadoop2.4.1 源码编译
- hadoop2.4.0源码编译
- 编译hadoop2.6.0源码
- Hadoop2.6源码编译
- 关于JavaScript跨域问题 及 实时刷新
- Swift编程语言入门实战系列教程(五)---增加键盘输入函数
- 剑指offer面试题32
- sqlite操作
- Object literals新特性(非原创)
- hadoop2.2.0源码编译笔记
- [Hibernate系列—] 3. 映射文件与使用SchemaExport自动产生Schema
- CSocket类的Receive超时的问题解决方案
- java基础学习
- 14. 多线程
- 2014.03.16 网易游戏TTT计划实习生笔试题
- 简单的wcf服务
- VPN中转服务器方案
- VC,VB程序按钮、图标样式美化