Help us understand the problem. What is going on with this article?

Run Apache Spark on Mac

More than 3 years have passed since last update.

一見敷居が高そうなBig data frame work Apache Sparkを試してみました。とてもSparkの実行は簡単です。

Spark version

1.4.0

Download binary file

$ wget http://www.apache.org/dyn/closer.cgi/spark/spark-1.4.0/spark-1.4.0.tgz
$ tar zxvf spark-1.4.0-bin-hadoop2.6.tgz

Run examples

Scala

$ cd spark-1.4.0-bin-hadoop2.6
$ ./bin/run-example SparkPi

Sparkの例はGithubにあり、なかにどうのように実行すればいいか書いてある場合があるので、なにか動かしたいひとはとりあえず例をみる。もしくは、パッケージと対応しているのでパッケージのパスをrun-exampleに渡す。

$ ./bin/run-example org.apache.spark.examples.mllib.Correlations

Python

$ ./bin/spark-submit examples/src/main/python/pi.py

Pythonの場合であれば、spark-submitを使う。同様コードはexmaplesの中にある。

Compile from source

$ git clone git://github.com/apache/spark.git
$ cd spark

Export JAVA_HOME

$ export JAVA_HOME=$(/usr/libexec/java_home)
$ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.7.0_72.jdk/Contents/Home

build spark

$ ./build/mvn -DskipTests clean package

10分くらいかかる模様。

[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10:25 min
[INFO] Finished at: 2015-06-25T08:34:17+09:00
[INFO] Final Memory: 72M/612M
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした