1.下载spark1.4源码包:spark-1.4.0.tgz
2.解压,修改make-distribution.sh文件
VERSION=1.4.0 SCALA_VERSION=2.10.4 SPARK_HADOOP_VERSION=2.5.0-cdh5.3.6 SPARK_HIVE=1 # VERSION=$("$MVN" help:evaluate -Dexpression=project.version $@ 2>/dev/null | grep -v "INFO" | tail -n 1) # SCALA_VERSION=$("$MVN" help:evaluate -Dexpression=scala.binary.version $@ 2>/dev/null\ # | grep -v "INFO"\ # | tail -n 1) #SPARK_HADOOP_VERSION=$("$MVN" help:evaluate -Dexpression=hadoop.version $@ 2>/dev/null\ # | grep -v "INFO"\ # | tail -n 1) #SPARK_HIVE=$("$MVN" help:evaluate -Dexpression=project.activeProfiles -pl sql/hive $@ 2>/dev/null\ # | grep -v "INFO"\ # | fgrep --count "<id>hive</id>";\ # Reset exit status to 0, otherwise the script stops here if the last grep finds nothing\ # because we use "set -o pipefail" # echo -n)
3.编译,脚本如下:
./make-distribution.sh --tgz \ -Phadoop-2.4 -Dhadoop.version=2.5.0-cdh5.3.6 \ -Pyarn \ -Phive-0.13.1 -Phive-thriftserver
我的编译成功了,分享以下下载地址吧,spark-1.4.0-bin-2.5.0-cdh5.3.6.tgz,密码:8kos