本文介绍了Spark SQL 1.5 构建失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经在 Ubuntu 14.04 LTS 上安装了 Spark 1.5.当使用命令 build/mvn -Dscala-2.11 -DskipTests clean package
运行构建时,我在 Spark SQL 项目期间收到以下构建错误:
I've installed Spark 1.5 on Ubuntu 14.04 LTS.When running build with command build/mvn -Dscala-2.11 -DskipTests clean package
I get the following build error during project Spark SQL:
[error] missing or invalid dependency detected while loading class file 'WebUI.class'.
[error] Could not access term eclipse in package org,
[error] because it (or its dependencies) are missing. Check your build definition for
[error] missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.)
[error] A full rebuild may help if 'WebUI.class' was compiled against an incompatible version of org.
[error] missing or invalid dependency detected while loading class file 'WebUI.class'.
[error] Could not access term jetty in value org.eclipse,
[error] because it (or its dependencies) are missing. Check your build definition for
[error] missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.)
[error] A full rebuild may help if 'WebUI.class' was compiled against an incompatible version of org.eclipse.
[warn] 22 warnings found
[error] two errors found
[error] Compile failed at Sep 18, 2015 6:09:38 PM [17.330s]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Spark Project Parent POM ........................... SUCCESS [ 6.723 s]
[INFO] Spark Project Core ................................. SUCCESS [03:07 min]
...
[INFO] Spark Project Catalyst ............................. SUCCESS [ 58.166 s]
[INFO] Spark Project SQL .................................. FAILURE [ 19.912 s]
[INFO] Spark Project Hive ................................. SKIPPED
[INFO] Spark Project Unsafe ............................... SKIPPED
...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
在文件 .bashrc
export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64
export SCALA_HOME=/usr/local/src/scala/scala-2.11.7
export PATH=$SCALA_HOME/bin:$PATH
export PATH=/home/ubuntu/apache-maven-3.3.3/bin:$PATH
export SPARK_HOME=/home/ubuntu/spark-1.5.0
export MAVEN_OPTS="-Xmx2g -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=512m"
更新:尝试使用 -Ylog-classpath 运行,但没有成功:
Update: tried to run with -Ylog-classpath, but didn't work:
Unable to parse command line options: Unrecognized option: -Ylog-classpath
推荐答案
参考 Angelo Genovese 的评论,不要在 build 命令中包含 -Dscala-2.11.
Refer to Angelo Genovese's comment, do not include -Dscala-2.11 in build command.
这篇关于Spark SQL 1.5 构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!