LoginSignup
4
4

More than 5 years have passed since last update.

learning-spark on Mac OS X Mavericks

Last updated at Posted at 2014-07-23

set up Spark

shell
$ cd /usr/local/Cellar
$ git clone git@github.com:apache/spark.git
$ cd spark
$ sbt/sbt assembly
$ sbt/sbt publish-local

configure SPARK_HOME

shell
$ vi ~/.xxxrc
export SPARK_HOME=/usr/local/Cellar/spark

spark-shell

shell
$ cd $SPARK_HOME
$ ./bin/spark-shell

build

shell
$ git clone git@github.com:databricks/learning-spark.git
$ cd learning-spark
$ sbt/sbt compile

run

shell
$ sbt/sbt run
Multiple main classes detected, select one to run:
shell
$ sbt/sbt 'run-main com.oreilly.learningsparkexamples.scala.BasicAvgFromFile local[4] inputfile'
shell
$ sbt/sbt assembly
$ cp target/scala-2.10/learning-spark-examples-assembly-0.0.1.jar ~/.
$ cd ~
$ CLASSPATH=./learning-spark-examples-assembly-0.0.1.jar
$ java -cp $CLASSPATH com.oreilly.learningsparkexamples.scala.BasicAvgFromFile local[4] inputfile
4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4