maven - Spark SQL 1.5 构建失败

标签 maven build apache-spark apache-spark-sql

我已经安装 Spark 1.5 在 Ubuntu 14.04 LTS 上。
使用命令运行构建时 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 中的 env 变量
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

最佳答案

就跑 ./dev/change-scala-version.sh 2.11从你的 spark 目录将所有代码切换到 2.11。然后运行 ​​mvn (3.3.3+) 或 make-distribution.sh设置好你的标志。

关于maven - Spark SQL 1.5 构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32656734/

相关文章:

hadoop - 控制 Spark 集群中作业或任务的分布

java - 即使运行突然终止,我们如何才能在 TestNG 中获得成功运行测试的结果?

java - 使用资源构建java库

scala - sbt 中 scalaSource 和 sourceDirectories 之间的区别

Golang 可以为特定的 Go 版本构建标签吗?

java - 从 Spark 2.0 中的逗号分隔字符串行中获取不同的项目

python - Spark VectorAssembler 错误 - PySpark 2.3 - Python

java - 无法从自定义 Maven Nexus 存储库下载的 jar 导入类

eclipse - 使用 Jubula 和 Maven 自动化 'Eclipse Plugin' 测试

java - 使用Bamboo在远程Windows服务器上构建和部署