Spark2.0编译
1 前言
Spark2.0正式版于今天正式发布,本文基于CDH5.0.2的Spark编译。
2 编译步骤
#2.1 下载源码
wget https://github.com/apache/spark/archive/v2.0.0.tar.gz
#2.2 解压配置
基于CDH5.0.2配置pom文件,添加
<profile>
<id>cdh5.0.2</id>
<properties>
<hadoop.version>2.3.0-cdh5.0.2</hadoop.version>
<hbase.version>0.96.1.1-cdh5.0.2</hbase.version>
<zookeeper.version>3.4.5-cdh5.0.2</zookeeper.version>
</properties>
</profile>
编译:
build/mvn -Pyarn -Pcdh5.0.2 -Phive -Phive-thriftserver -Pnative -DskipTests package
报错1:
上述命令,由于国外maven.twttr.com被墙,添加hosts,199.16.156.89 maven.twttr.com,再次执行
报错2:找不到2.3.0-cdh5.0.2,查找pom文件,有关cloudrea源被移除,添加上:
<repository>
<id>cloudera-repo</id>
<name>Cloudera Repository</name>
<url>https://repository.cloudera.com/artifactory/cloudera-repos</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
报错3:超时报错,重新执行
#2.3 成功如下: