From 3ac3ceb524cfd5ff3b26e33d5d83ecab46969189 Mon Sep 17 00:00:00 2001 From: Reynold Xin Date: Thu, 17 Apr 2014 22:10:46 -0700 Subject: [PATCH 1/2] README update --- README.md | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index dc8135b9b8b51..69dd1b66d3c5a 100644 --- a/README.md +++ b/README.md @@ -10,20 +10,35 @@ guide, on the project webpage at . This README file only contains basic setup instructions. -## Building +## Building Spark -Spark requires Scala 2.10. The project is built using Simple Build Tool (SBT), -which can be obtained [here](http://www.scala-sbt.org). If SBT is installed we -will use the system version of sbt otherwise we will attempt to download it -automatically. To build Spark and its example programs, run: +Spark requires Scala 2.10. The project is built using Simple Build Tool (SBT). +If SBT is installed, Spark will use the system version of sbt; otherwise Spark +will download it automatically. To build Spark and its example programs, run: ./sbt/sbt assembly -Once you've built Spark, the easiest way to start using it is the shell: +## Interactive Scala Shell + +The easiest way to start using Spark is through the Scala shell: ./bin/spark-shell -Or, for the Python API, the Python shell (`./bin/pyspark`). +Try the following command, which should return 1000: + + scala> sc.parallelize(1 to 1000).count() + +## Interactive Python Shell + +Alternatively, if you prefer Python, you can use the Python shell: + + ./bin/pyspark + +And run the following command, which should also return 1000: + + >>> sc.parallelize(range(1000)).count() + +## Example Programs Spark also comes with several sample programs in the `examples` directory. To run one of them, use `./bin/run-example `. For example: @@ -38,13 +53,13 @@ All of the Spark samples take a `` parameter that is the cluster URL to connect to. This can be a mesos:// or spark:// URL, or "local" to run locally with one thread, or "local[N]" to run locally with N threads. -## Running tests +## Running Tests -Testing first requires [Building](#building) Spark. Once Spark is built, tests +Testing first requires [building Spark](#building-spark). Once Spark is built, tests can be run using: -`./sbt/sbt test` - + ./sbt/sbt test + ## A Note About Hadoop Versions Spark uses the Hadoop core library to talk to HDFS and other Hadoop-supported From 16853dee69d0146892f9d04e202ba9e299dcaa21 Mon Sep 17 00:00:00 2001 From: Reynold Xin Date: Fri, 18 Apr 2014 12:08:14 -0700 Subject: [PATCH 2/2] Updated SBT and Scala instructions. --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 69dd1b66d3c5a..e2d1dcb5672ff 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,7 @@ This README file only contains basic setup instructions. ## Building Spark -Spark requires Scala 2.10. The project is built using Simple Build Tool (SBT). -If SBT is installed, Spark will use the system version of sbt; otherwise Spark -will download it automatically. To build Spark and its example programs, run: +Spark is built on Scala 2.10. To build Spark and its example programs, run: ./sbt/sbt assembly