我在Ubuntu上安装Apache Spark时遇到困难。我使用Spark-0.8.1启动,并且./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 Sources Directory外部调用的:
$ /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/)
...
您两次键入" abt",但这不应该是" sbt"吗?Apache Spark拥有自己的SBT副本,因此请确保您正在运行Spark的版本,以访问其他自定义插件。
要运行SBT的火花安装,请转到Spark Directory并运行./sbt/sbt assembly
。