3

我在 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]            

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

4

2 回答 2

6

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]         ^

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

$  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/)
...
于 2014-01-21T00:11:55.610 回答
4

您输入了两次“abt”,但不应该是“sbt”吗?Apache Spark 有自己的 sbt 副本,因此请确保您正在运行 Spark 的版本以获取“程序集”插件以及其他自定义项。

要运行 sbt 的 Spark 安装,请转到 Spark 目录并运行./sbt/sbt assembly.

于 2014-01-20T23:39:29.880 回答