阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

Cloudera Hadoop Maven编译安装步骤详细教程

164次阅读
没有评论

共计 1976 个字符,预计需要花费 5 分钟才能阅读完成。

Cloudera Hadoop Maven 编译安装步骤详细教程

OS: Ubuntu 12.04

1. 下载 hadoop-0.20.2-cdh3u6.tar.gz 源码包

http://www.cloudera.com

2. 安装配置 maven 源

/etc/maven2/settings.xml

apt-get install maven2

3. 到 search.maven.org 上搜索下载缺少的 jar 包
jar 包列表:
org.apache.maven.doxia:doxia-module-confluence:jar:1.1.3
org.apache.maven.doxia:doxia-module-apt:jar:1.1.3
org.apache.maven.doxia:doxia-module-xdoc:jar:1.1.3
org.codehaus.plexus:plexus-utils:jar:1.5.9
org.apache.maven.surefire:surefire-booter:jar:2.5
org.apache.maven.plugins:maven-surefire-plugin:jar:2.5
搜索方式
g:”org.apache.maven.plugins” AND a:”maven-surefire-plugin” AND v:”2.5″

groupIP artifact version

4. 安装 jar 包
mvn install:install-file -DgroupId=org.apache.maven.doxia -DartifactId=doxia-module-confluence -Dversion=1.1.3 -Dpackaging=jar -Dfile=/path/to/file

需要指定 groupID、artifactID、version

5. 修改 cloudera/maven-packaging/pom.xml

为解决 package 过程中的如下 ERROR

[ERROR] BUILD ERROR
[INFO] ————————————————————————
[INFO] Internal error in the plugin manager executing goal ‘org.apache.maven.plugins:maven-surefire-plugin:2.5:test’: Unable to load the mojo ‘org.apache.maven.plugins:maven-surefire-plugin:2.5:test’ in the plugin ‘org.apache.maven.plugins:maven-surefire-plugin’. A required class is missing: org/apache/maven/surefire/util/NestedCheckedException
org.apache.maven.surefire.util.NestedCheckedException
mvn install:install-file -DgroupId=org.apache.maven.plugins -DartifactId=maven-surefire-plugin -Dversion=2.16 -Dpackaging=jar -Dfile=/path/to/file

A required class is missing: org/apache/maven/surefire/util/NestedCheckedException

需要在增加 cloudera/maven-packaging/pom.xml 中增加 plugin 配置
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
                <skipTests>true</skipTests>
            </configuration>
    <version>2.16</version>

</plugin>

6. 编译 hadoop
mvn -f cloudera/maven-packaging/pom.xml package -DskipTests=true

更多 Ubuntu 相关信息见Ubuntu 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=2

更多 Hadoop 相关信息见Hadoop 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=13

正文完
星哥说事-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-20发表,共计1976字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中