Spark2.0正式版於今天正式發佈,本文基於CDH5.0.2的Spark編譯。git
#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 成功以下: