scala - Apache Spark 项目的 "./sbt/sbt assembly"错误 "Not a valid command: assembly"

标签 scala sbt apache-spark

我在 Ubuntu 13.04 上安装 Apache Spark 时遇到问题。我使用 spark-0.8.1-incubating,./sbt/sbt update./sbt/sbt compile 都可以正常工作。但是,当我执行 ./sbt/sbt assembly 时,会出现以下错误:

[info] Set current project to default-289e76 (in build  file:/node-insights/server/lib/spark-0.8.1-incubating/sbt/)   
[error] Not a valid command: assembly   
[error] Not a valid project ID: assembly   
[error] Not a valid configuration: assembly   
[error] Not a valid key: assembly   
[error] assembly   
[error]            

我搜索了与此相关的东西,但找不到任何有用的东西。任何指导将不胜感激。

最佳答案

current project set to default-289e76 消息表明 sbt 是从 Spark 源目录之外调用的:

$  /tmp  ./spark-0.8.1-incubating/sbt/sbt assembly
[info] Loading global plugins from /Users/joshrosen/.dotfiles/.sbt/plugins/project
[info] Loading global plugins from /Users/joshrosen/.dotfiles/.sbt/plugins
[info] Set current project to default-d0f036 (in build file:/private/tmp/)
[error] Not a valid command: assembly
[error] Not a valid project ID: assembly
[error] Not a valid configuration: assembly
[error] Not a valid key: assembly
[error] assembly
[error]         ^

spark-0.8.1-incubating 目录中运行 ./sbt/sbt assembly 工作正常(注意日志输出显示当前项目设置正确) :

$  spark-0.8.1-incubating  sbt/sbt assembly
[info] Loading global plugins from /Users/joshrosen/.dotfiles/.sbt/plugins/project
[info] Loading global plugins from /Users/joshrosen/.dotfiles/.sbt/plugins
[info] Loading project definition from /private/tmp/spark-0.8.1-incubating/project/project
[info] Loading project definition from /private/tmp/spark-0.8.1-incubating/project
[info] Set current project to root (in build file:/private/tmp/spark-0.8.1-incubating/)
...

关于scala - Apache Spark 项目的 "./sbt/sbt assembly"错误 "Not a valid command: assembly",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21245669/

相关文章:

scala - self类型注解,为什么要用self : => and not val?

scala - sbt 和 scct .... 未找到模块 : reaktor#sbt-scct;0. 2-SNAPSHOT

scala.tools.reflect.ToolBoxError 异常

android - 在使用 Android SDK 插件编译 Scala Android 多项目期间,X 已被定义为对象 X

scala - 使用 yarn 上 spark-submit 的 --archives 选项上传 zip 文件

apache-spark - Spark 执行器登录 YARN

java - Scala 与 Java 方法调用

scala - 在 akka Receive 中保存类型信息

scala - sbt命令抛出空指针异常

java - Spark 上第三方服务的 SSL 证书