我的spark版本是2.1.0,Hadoop版本是2.6.0-cdh5.7.0,JDK版本1.7,maven版本3.3.9
并添加到pom.xml:
<repository>
<id>cloudera</id>
<url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
</repository>
当我将源代码构建为./dev/make-distribution.sh --name 2.6.0-cdh5.7.0 --tgz -Pyarn -Phadoop-2.6 -Phive -Phive-thriftserver -Dhadoop.version=2.6.0-cdh5.7.0
我知道了
[japson@localhost spark-2.1.0]$ ./dev/make-distribution.sh --name 2.6.0-cdh5.7.0 --tgz -Pyarn -Phadoop-2.6 -Phive -Phive-thriftserver -Dhadoop.version=2.6.0-cdh5.7.0 -X
+++ dirname ./dev/make-distribution.sh
++ cd ./dev/..
++ pwd
+ SPARK_HOME=/home/japson/app/spark-2.1.0
+ DISTDIR=/home/japson/app/spark-2.1.0/dist
+ MAKE_TGZ=false
+ MAKE_PIP=false
+ MAKE_R=false
+ NAME=none
+ MVN=/home/japson/app/spark-2.1.0/build/mvn
+ (( 9 ))
+ case $1 in
+ NAME=2.6.0-cdh5.7.0
+ shift
+ shift
+ (( 7 ))
+ case $1 in
+ MAKE_TGZ=true
+ shift
+ (( 6 ))
+ case $1 in
+ break
+ '[' -z /home/japson/software/jdk1.7.0_79 ']'
+ '[' -z /home/japson/software/jdk1.7.0_79 ']'
++ command -v git
+ '[' ']'
++ command -v /home/japson/app/spark-2.1.0/build/mvn
+ '[' '!' /home/japson/app/spark-2.1.0/build/mvn ']'
++ tail -n 1
++ grep -v INFO
++ /home/japson/app/spark-2.1.0/build/mvn help:evaluate -
Dexpression=project.version -Pyarn -Phadoop-2.6 -Phive -Phive-thriftserver -Dhadoop.version=2.6.0-cdh5.7.0 -X
+ VERSION='[ERROR] [Help 3] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException'
那么,有什么解决办法吗?谢谢!
答案 0 :(得分:0)
请参见this,解决方案是:
在构建目录(从中执行mvn命令的位置)中添加目录:
.mvn
(带有cmd mkdir .mvn
)
在其中创建文件
jvm.config
将以下行放入jvm.config
-Dhttps.protocols=TLSv1.2