Spark SQL 1.5 构建失败
Spark SQL 1.5 build failure
我已经在 Ubuntu 14.04 LTS 上安装了 Spark 1.5。
当 运行ning 使用命令 build/mvn -Dscala-2.11 -DskipTests clean package
构建时,我在项目 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,但没有成功:
Unable to parse command line options: Unrecognized option: -Ylog-classpath
参考Angelo Genovese的评论,不要在构建命令中包含-Dscala-2.11。
如果您不是特别需要 spark-sql,那么只需从构建中排除 sql 相关模块:
mvn clean package -Dscala-2.11 -DskipTests -pl '!sql/core,!sql/catalyst,!sql/hive'
只需从您的 spark 目录 运行 ./dev/change-scala-version.sh 2.11
将所有代码切换到 2.11。然后 运行 mvn
(3.3.3+) 或 make-distribution.sh
设置你的标志。
首先通过位于@spark-1.6.1/dev/change-scala-version.sh 2.11 运行 'change-scala-version.sh' 命令将 scala 版本从 2.10 更改为 2.11 可以解决此构建问题=11=]
参考下面的link了解详细信息。
http://gibbons.org.uk/spark-on-windows-feb-2016
我也 运行 遇到过这个问题,在我从 Maven pom.xml
导入 IntelliJ 的项目中。我的同事帮助我弄清楚,虽然 <scope>runtime</scope>
对于大多数依赖项是可以的,但这个特定的依赖项需要 <scope>compile</scope>
(由于我们不明白的原因):
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-reflect</artifactId>
<version>${scala.version}</version>
<scope>compile</scope>
</dependency>
我已经在 Ubuntu 14.04 LTS 上安装了 Spark 1.5。
当 运行ning 使用命令 build/mvn -Dscala-2.11 -DskipTests clean package
构建时,我在项目 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,但没有成功:
Unable to parse command line options: Unrecognized option: -Ylog-classpath
参考Angelo Genovese的评论,不要在构建命令中包含-Dscala-2.11。
如果您不是特别需要 spark-sql,那么只需从构建中排除 sql 相关模块:
mvn clean package -Dscala-2.11 -DskipTests -pl '!sql/core,!sql/catalyst,!sql/hive'
只需从您的 spark 目录 运行 ./dev/change-scala-version.sh 2.11
将所有代码切换到 2.11。然后 运行 mvn
(3.3.3+) 或 make-distribution.sh
设置你的标志。
首先通过位于@spark-1.6.1/dev/change-scala-version.sh 2.11 运行 'change-scala-version.sh' 命令将 scala 版本从 2.10 更改为 2.11 可以解决此构建问题=11=]
参考下面的link了解详细信息。 http://gibbons.org.uk/spark-on-windows-feb-2016
我也 运行 遇到过这个问题,在我从 Maven pom.xml
导入 IntelliJ 的项目中。我的同事帮助我弄清楚,虽然 <scope>runtime</scope>
对于大多数依赖项是可以的,但这个特定的依赖项需要 <scope>compile</scope>
(由于我们不明白的原因):
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-reflect</artifactId>
<version>${scala.version}</version>
<scope>compile</scope>
</dependency>