Spark环境安装-快速

Mac 10.10.5

  1. 下载spark:git clone git://github.com/mesos/spark.git

  2. 编译:sbt/sbt update compile

  3. 进入交互控制台:./spark-shell.sh


官网快速启动的例子:http://spark.apache.org/docs/latest/

官方高级应用的例子:https://databricks-training.s3.amazonaws.com/index.html


编译成jar导入到项目中使用:

执行:./sbt/sbt assembly  ( ./sbt/sbt clean  清理后才能重新编译)

编译成功会产生jar:spark-assembly-1.5.0-hadoop2.2.0.jar,可导入到项目中使用

[info] Assembly up to date: /Users/moks/workspace/idea/spark/spark/spark-1.5.0/assembly/target/scala-2.10/spark-assembly-1.5.0-hadoop2.2.0.jar  

你可能感兴趣的:(Spark环境安装-快速)