Skip to content

Commit

Permalink
[Spark-1261] add instructions for running python examples to doc over…
Browse files Browse the repository at this point in the history
…view page

Author: Diana Carroll <dcarroll@cloudera.com>

Closes apache#162 from dianacarroll/SPARK-1261 and squashes the following commits:

14ac602 [Diana Carroll] typo in python example text
5121e3e [Diana Carroll] Add explanation of how to run Python examples to main doc overview page
  • Loading branch information
Diana Carroll authored and mateiz committed Mar 18, 2014
1 parent 796977a commit 087eedc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ For its Scala API, Spark {{site.SPARK_VERSION}} depends on Scala {{site.SCALA_BI

# Running the Examples and Shell

Spark comes with several sample programs in the `examples` directory.
To run one of the samples, use `./bin/run-example <class> <params>` in the top-level Spark directory
Spark comes with several sample programs. Scala and Java examples are in the `examples` directory, and Python examples are in `python/examples`.
To run one of the Java or Scala sample programs, use `./bin/run-example <class> <params>` in the top-level Spark directory
(the `bin/run-example` script sets up the appropriate paths and launches that program).
For example, try `./bin/run-example org.apache.spark.examples.SparkPi local`.
To run a Python sample program, use `./bin/pyspark <sample-program> <params>`. For example, try `./bin/pyspark ./python/examples/pi.py local`.

Each example prints usage help when run with no parameters.

Note that all of the sample programs take a `<master>` parameter specifying the cluster URL
Expand Down

0 comments on commit 087eedc

Please sign in to comment.