Latest commit cc00e99 Jul 22, 2017 @holdenk holdenk [SPARK-21434][PYTHON][DOCS] Add pyspark pip documentation.
## What changes were proposed in this pull request?

Update the Quickstart and RDD programming guides to mention pip.

## How was this patch tested?

Built docs locally.

Author: Holden Karau <holden@us.ibm.com>

Closes #18698 from holdenk/SPARK-21434-add-pyspark-pip-documentation.
Permalink
..
Failed to load latest commit information.
_data [SPARK-20505][ML] Add docs and examples for ml.stat.Correlation and m… May 18, 2017
_includes [SPARK-14817][ML][MLLIB][DOC] Made DataFrame-based API primary in MLl… Jul 15, 2016
_layouts [SPARK-21267][SS][DOCS] Update Structured Streaming Documentation Jul 7, 2017
_plugins [SPARK-18923][DOC][BUILD] Support skipping R/Python API docs Dec 21, 2016
css [SPARK-12324][MLLIB][DOC] Fixes the sidebar in the ML documentation Dec 16, 2015
img [SPARK-19074][SS][DOCS] Updated Structured Streaming Programming Guid… Jan 6, 2017
js [SPARK-19402][DOCS] Support LaTex inline formula correctly and fix wa… Feb 1, 2017
README.md [SPARK-18923][DOC][BUILD] Support skipping R/Python API docs Dec 21, 2016
_config.yml [SPARK-20759] SCALA_VERSION in _config.yml should be consistent with … May 19, 2017
api.md [SPARK-8639] [DOCS] Fixed Minor Typos in Documentation Jun 27, 2015
building-spark.md [SPARK-19810][BUILD][CORE] Remove support for Scala 2.10 Jul 13, 2017
cloud-integration.md [SPARK-7481][BUILD] Add spark-hadoop-cloud module to pull in object s… May 7, 2017
cluster-overview.md [SPARK-18278][SCHEDULER] Documentation to point to Kubernetes cluster… Apr 4, 2017
configuration.md [SPARK-21243][Core] Limit no. of map outputs in a shuffle fetch Jul 19, 2017
contributing-to-spark.md [SPARK-18073][DOCS][WIP] Migrate wiki to spark.apache.org web site Nov 23, 2016
graphx-programming-guide.md [SPARK-21267][DOCS][MINOR] Follow up to avoid referencing programming… Jul 15, 2017
hadoop-provided.md [SPARK-6511] [docs] Fix example command in hadoop-provided docs. Jun 11, 2015
hardware-provisioning.md [SPARK-19660][CORE][SQL] Replace the configuration property names tha… Feb 28, 2017
index.md [SPARK-21267][DOCS][MINOR] Follow up to avoid referencing programming… Jul 15, 2017
job-scheduling.md [SPARK-16505][YARN] Optionally propagate error during shuffle service… Jul 14, 2016
ml-advanced.md [SPARK-18705][ML][DOC] Update user guide to reflect one pass solver f… Dec 8, 2016
ml-ann.md [SPARK-14817][ML][MLLIB][DOC] Made DataFrame-based API primary in MLl… Jul 15, 2016
ml-classification-regression.md [SPARK-20849][DOC][SPARKR] Document R DecisionTree May 26, 2017
ml-clustering.md [SPARK-19386][SPARKR][DOC] Bisecting k-means in SparkR documentation Feb 3, 2017
ml-collaborative-filtering.md [SPARK-19345][ML][DOC] Add doc for "coldStartStrategy" usage in ALS Mar 2, 2017
ml-decision-tree.md [SPARK-14817][ML][MLLIB][DOC] Made DataFrame-based API primary in MLl… Jul 15, 2016
ml-ensembles.md [SPARK-14817][ML][MLLIB][DOC] Made DataFrame-based API primary in MLl… Jul 15, 2016
ml-features.md [SPARK-19969][ML] Imputer doc and example Apr 3, 2017
ml-frequent-pattern-mining.md [SPARK-19791][ML] Add doc and example for fpgrowth Apr 29, 2017
ml-guide.md [SPARK-21267][DOCS][MINOR] Follow up to avoid referencing programming… Jul 15, 2017
ml-linear-methods.md [SPARK-14817][ML][MLLIB][DOC] Made DataFrame-based API primary in MLl… Jul 15, 2016
ml-migration-guides.md [SPARK-20506][DOCS] 2.2 migration guide May 19, 2017
ml-pipeline.md [SPARK-19797][DOC] ML pipeline document correction Mar 3, 2017
ml-statistics.md [SPARK-20505][ML] Add docs and examples for ml.stat.Correlation and m… May 18, 2017
ml-survival-regression.md [SPARK-14817][ML][MLLIB][DOC] Made DataFrame-based API primary in MLl… Jul 15, 2016
ml-tuning.md [SPARK-19410][DOC] Fix brokens links in ml-pipeline and ml-tuning Feb 1, 2017
mllib-classification-regression.md [SPARK-14817][ML][MLLIB][DOC] Made DataFrame-based API primary in MLl… Jul 15, 2016
mllib-clustering.md [SPARK-18427][DOC] Update docs of mllib.KMeans Nov 15, 2016
mllib-collaborative-filtering.md [SPARK-20011][ML][DOCS] Clarify documentation for ALS 'rank' parameter Mar 21, 2017
mllib-data-types.md [MINOR][DOCS] Fix minor typos in python example code Aug 30, 2016
mllib-decision-tree.md [SPARK-14817][ML][MLLIB][DOC] Made DataFrame-based API primary in MLl… Jul 15, 2016
mllib-dimensionality-reduction.md [SPARK-6227][MLLIB][PYSPARK] Implement PySpark wrappers for SVD and P… May 3, 2017
mllib-ensembles.md [SPARK-14817][ML][MLLIB][DOC] Made DataFrame-based API primary in MLl… Jul 15, 2016
mllib-evaluation-metrics.md [SPARK-14817][ML][MLLIB][DOC] Made DataFrame-based API primary in MLl… Jul 15, 2016
mllib-feature-extraction.md [SPARK-17645][MLLIB][ML][FOLLOW-UP] document minor change Jan 10, 2017
mllib-frequent-pattern-mining.md [SPARK-19791][ML] Add doc and example for fpgrowth Apr 29, 2017
mllib-guide.md [SPARK-14817][ML][MLLIB][DOC] Made DataFrame-based API primary in MLl… Jul 15, 2016
mllib-isotonic-regression.md [SPARK-18445][BUILD][DOCS] Fix the markdown for `Note:`/`NOTE:`/`Note… Nov 19, 2016
mllib-linear-methods.md [SPARK-19550][BUILD][CORE][WIP] Remove Java 7 support Feb 16, 2017
mllib-migration-guides.md [SPARK-14817][ML][MLLIB][DOC] Made DataFrame-based API primary in MLl… Jul 15, 2016
mllib-naive-bayes.md [SPARK-14817][ML][MLLIB][DOC] Made DataFrame-based API primary in MLl… Jul 15, 2016
mllib-optimization.md [SPARK-21267][DOCS][MINOR] Follow up to avoid referencing programming… Jul 15, 2017
mllib-pmml-model-export.md [SPARK-14817][ML][MLLIB][DOC] Made DataFrame-based API primary in MLl… Jul 15, 2016
mllib-statistics.md [SPARK-19550][BUILD][CORE][WIP] Remove Java 7 support Feb 16, 2017
monitoring.md Small rewording about history server use case Apr 21, 2017
programming-guide.md [SPARK-21267][SS][DOCS] Update Structured Streaming Documentation Jul 7, 2017
quick-start.md [SPARK-21434][PYTHON][DOCS] Add pyspark pip documentation. Jul 21, 2017
rdd-programming-guide.md [SPARK-21434][PYTHON][DOCS] Add pyspark pip documentation. Jul 21, 2017
running-on-mesos.md [SPARK-21456][MESOS] Make the driver failover_timeout configurable Jul 19, 2017
running-on-yarn.md [SPARK-20434][YARN][CORE] Move Hadoop delegation token code from yarn… Jun 15, 2017
security.md [MINOR][DOC] Fix doc for web UI https configuration Mar 3, 2017
spark-standalone.md [SPARK-21267][DOCS][MINOR] Follow up to avoid referencing programming… Jul 15, 2017
sparkr.md [SPARK-20849][DOC][SPARKR] Document R DecisionTree May 26, 2017
sql-programming-guide.md [SPARK-21267][SS][DOCS] Update Structured Streaming Documentation Jul 7, 2017
storage-openstack-swift.md [SPARK-7481][BUILD] Add spark-hadoop-cloud module to pull in object s… May 7, 2017
streaming-custom-receivers.md [SPARK-19550][BUILD][CORE][WIP] Remove Java 7 support Feb 16, 2017
streaming-flume-integration.md [SPARK-17985][CORE] Bump commons-lang3 version to 3.5. Oct 19, 2016
streaming-kafka-0-10-integration.md [SPARK-19185][DSTREAM] Make Kafka consumer cache configurable Jun 8, 2017
streaming-kafka-0-8-integration.md [SPARK-19550][BUILD][CORE][WIP] Remove Java 7 support Feb 16, 2017
streaming-kafka-integration.md [SPARK-16312][STREAMING][KAFKA][DOC] Doc for Kafka 0.10 integration Aug 5, 2016
streaming-kinesis-integration.md [DSTREAM][DOC] Add documentation for kinesis retry configurations May 18, 2017
streaming-programming-guide.md [SPARK-21267][DOCS][MINOR] Follow up to avoid referencing programming… Jul 15, 2017
structured-streaming-kafka-integration.md [MINOR][SS][DOCS] Minor doc change for kafka integration Jul 21, 2017
structured-streaming-programming-guide.md [SPARK-21069][SS][DOCS] Add rate source to programming guide. Jul 8, 2017
submitting-applications.md Document Master URL format in high availability set up Apr 11, 2017
tuning.md [SPARK-21267][DOCS][MINOR] Follow up to avoid referencing programming… Jul 15, 2017

README.md

Welcome to the Spark documentation!

This readme will walk you through navigating and building the Spark documentation, which is included here with the Spark source code. You can also find documentation specific to release versions of Spark at http://spark.apache.org/documentation.html.

Read on to learn more about viewing documentation in plain text (i.e., markdown) or building the documentation yourself. Why build it yourself? So that you have the docs that corresponds to whichever version of Spark you currently have checked out of revision control.

Prerequisites

The Spark documentation build uses a number of tools to build HTML docs and API docs in Scala, Python and R.

You need to have Ruby and Python installed. Also install the following libraries:

    $ sudo gem install jekyll jekyll-redirect-from pygments.rb
    $ sudo pip install Pygments
    # Following is needed only for generating API docs
    $ sudo pip install sphinx pypandoc
    $ sudo Rscript -e 'install.packages(c("knitr", "devtools", "roxygen2", "testthat", "rmarkdown"), repos="http://cran.stat.ucla.edu/")'

(Note: If you are on a system with both Ruby 1.9 and Ruby 2.0 you may need to replace gem with gem2.0)

Generating the Documentation HTML

We include the Spark documentation as part of the source (as opposed to using a hosted wiki, such as the github wiki, as the definitive documentation) to enable the documentation to evolve along with the source code and be captured by revision control (currently git). This way the code automatically includes the version of the documentation that is relevant regardless of which version or release you have checked out or downloaded.

In this directory you will find textfiles formatted using Markdown, with an ".md" suffix. You can read those text files directly if you want. Start with index.md.

Execute jekyll build from the docs/ directory to compile the site. Compiling the site with Jekyll will create a directory called _site containing index.html as well as the rest of the compiled files.

$ cd docs
$ jekyll build

You can modify the default Jekyll build as follows:

    # Skip generating API docs (which takes a while)
    $ SKIP_API=1 jekyll build
    
    # Serve content locally on port 4000
    $ jekyll serve --watch
    
    # Build the site with extra features used on the live page
    $ PRODUCTION=1 jekyll build

API Docs (Scaladoc, Sphinx, roxygen2)

You can build just the Spark scaladoc by running build/sbt unidoc from the SPARK_PROJECT_ROOT directory.

Similarly, you can build just the PySpark docs by running make html from the SPARK_PROJECT_ROOT/python/docs directory. Documentation is only generated for classes that are listed as public in __init__.py. The SparkR docs can be built by running SPARK_PROJECT_ROOT/R/create-docs.sh.

When you run jekyll in the docs directory, it will also copy over the scaladoc for the various Spark subprojects into the docs directory (and then also into the _site directory). We use a jekyll plugin to run build/sbt unidoc before building the site so if you haven't run it (recently) it may take some time as it generates all of the scaladoc. The jekyll plugin also generates the PySpark docs using Sphinx.

NOTE: To skip the step of building and copying over the Scala, Python, R API docs, run SKIP_API=1 jekyll. In addition, SKIP_SCALADOC=1, SKIP_PYTHONDOC=1, and SKIP_RDOC=1 can be used to skip a single step of the corresponding language.