spark1.6编译

spark编译有3种

一.使用maven编译
mvn clean package \
-DskipTests-Phadoop-2.4 \
-Dhadoop.version=2.6.0 -Pyarn \
-Phive-0.13.1-Phive-thriftserver
二.使用 sbt编译(不做介绍)
三.打包编译make-distribution.sh
./make-distribution.sh –tgz\
-Phadoop-2.4-Dhadoop.version=2.60-cdh5.4.0\
-Pyarn\
-Phive-0.13.1-Phive-thriftserver

1.在maven3.3.9/conf vi setting.xml文件的
配置镜像

<mirror>
    <id>nexus-osc</id>
    <mirrorOf>*</mirrorOf>
    <name>Nexus osc</name>
    <url>http://maven.oschina.net/content/groups/public/</url>
</mirror>

2.配置/etc/resolve.conf 添加谷歌的域名解释器
namesever 8.8.8.8
nameserver 8.8.4.4

3.进入到spark源码下的make-distribution.sh将

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)

这块代码注释掉
结果为

VERSION=1.6.3
SCALA_VERSION=2.10.6
SPARK_HADOOP_VERSION=2.6.0
SPARK_HIVE=1     #表示要不要hive 不是版本号
#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)

4.执行./make-distribution.sh –tgz -Pyarn -Phadoop-2.4 -Dhadoop.version=2.6.0 -Phive-2.0.1 -Phive-thriftserver

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值