Apache Spark - A unified analytics engine for large-scale data processing
Go to file
2012-05-22 11:04:54 +02:00
bagel/src Added an option (spark.closure.serializer) to specify the serializer for 2012-04-09 21:59:56 -07:00
conf Removed java-opts.template 2011-05-24 15:59:01 -07:00
core Little refactoring 2012-05-22 11:04:54 +02:00
examples/src/main/scala/spark/examples Format the code as coding style agreed by Matei/TD/Haoyuan 2012-02-09 13:26:23 -08:00
project Remove dependency on Akka 2012-03-29 01:03:34 -04:00
repl Update REPL code to use our own version of JLineReader, which fixes #89. 2011-11-07 20:16:25 -08:00
sbt Update to SBT 0.11.1 2011-11-07 20:28:08 -08:00
.gitignore Added more SBT stuff to gitignore 2011-02-08 17:06:07 -08:00
kmeans_data.txt Fixed bugs 2012-01-09 11:59:52 -08:00
LICENSE Added BSD license 2010-12-07 10:32:17 -08:00
lr_data.txt Test commit 2012-02-06 09:58:06 -08:00
README.md Fix Scala version requirement in README 2011-11-03 22:42:36 -07:00
run Set SCALA_VERSION to 2.9.1 (from 2.9.1.final) to match expectation of SBT 0.11.0 2011-09-26 22:44:41 +01:00
spark-executor Made spark-executor output slightly nicer 2010-09-29 00:22:09 -07:00
spark-shell Ported code generation changes from 2.8 interpreter (to use a class for 2011-05-31 19:23:15 -07:00

Spark

Lightning-Fast Cluster Computing - http://www.spark-project.org/

Online Documentation

You can find the latest Spark documentation, including a programming guide, on the project wiki at http://github.com/mesos/spark/wiki. This file only contains basic setup instructions.

Building

Spark requires Scala 2.9.1. This version has been tested with 2.9.1.final.

The project is built using Simple Build Tool (SBT), which is packaged with it. To build Spark and its example programs, run:

sbt/sbt compile

To run Spark, you will need to have Scala's bin in your PATH, or you will need to set the SCALA_HOME environment variable to point to where you've installed Scala. Scala must be accessible through one of these methods on Mesos slave nodes as well as on the master.

To run one of the examples, use ./run <class> <params>. For example:

./run spark.examples.SparkLR local[2]

will run the Logistic Regression example locally on 2 CPUs.

Each of the example programs prints usage help if no params are given.

All of the Spark samples take a <host> parameter that is the Mesos master to connect to. This can be a Mesos URL, or "local" to run locally with one thread, or "local[N]" to run locally with N threads.

Configuration

Spark can be configured through two files: conf/java-opts and conf/spark-env.sh.

In java-opts, you can add flags to be passed to the JVM when running Spark.

In spark-env.sh, you can set any environment variables you wish to be available when running Spark programs, such as PATH, SCALA_HOME, etc. There are also several Spark-specific variables you can set:

  • SPARK_CLASSPATH: Extra entries to be added to the classpath, separated by ":".

  • SPARK_MEM: Memory for Spark to use, in the format used by java's -Xmx option (for example, -Xmx200m means 200 MB, -Xmx1g means 1 GB, etc).

  • SPARK_LIBRARY_PATH: Extra entries to add to java.library.path for locating shared libraries.

  • SPARK_JAVA_OPTS: Extra options to pass to JVM.

Note that spark-env.sh must be a shell script (it must be executable and start with a #! header to specify the shell to use).