tree: 109244eae23063c8af115700879c621d763b9ffc [path history] [tgz]
  1. _data/
  2. _includes/
  3. _layouts/
  4. _plugins/
  5. css/
  6. img/
  7. js/
  8. _config.yml
  9. api.md
  10. building-spark.md
  11. cloud-integration.md
  12. cluster-overview.md
  13. configuration.md
  14. contributing-to-spark.md
  15. graphx-programming-guide.md
  16. hadoop-provided.md
  17. hardware-provisioning.md
  18. index.md
  19. job-scheduling.md
  20. ml-advanced.md
  21. ml-ann.md
  22. ml-classification-regression.md
  23. ml-clustering.md
  24. ml-collaborative-filtering.md
  25. ml-datasource.md
  26. ml-decision-tree.md
  27. ml-ensembles.md
  28. ml-features.md
  29. ml-frequent-pattern-mining.md
  30. ml-guide.md
  31. ml-linear-methods.md
  32. ml-migration-guides.md
  33. ml-pipeline.md
  34. ml-statistics.md
  35. ml-survival-regression.md
  36. ml-tuning.md
  37. mllib-classification-regression.md
  38. mllib-clustering.md
  39. mllib-collaborative-filtering.md
  40. mllib-data-types.md
  41. mllib-decision-tree.md
  42. mllib-dimensionality-reduction.md
  43. mllib-ensembles.md
  44. mllib-evaluation-metrics.md
  45. mllib-feature-extraction.md
  46. mllib-frequent-pattern-mining.md
  47. mllib-guide.md
  48. mllib-isotonic-regression.md
  49. mllib-linear-methods.md
  50. mllib-migration-guides.md
  51. mllib-naive-bayes.md
  52. mllib-optimization.md
  53. mllib-pmml-model-export.md
  54. mllib-statistics.md
  55. monitoring.md
  56. programming-guide.md
  57. quick-start.md
  58. rdd-programming-guide.md
  59. README.md
  60. running-on-kubernetes.md
  61. running-on-mesos.md
  62. running-on-yarn.md
  63. security.md
  64. spark-standalone.md
  65. sparkr.md
  66. sql-data-sources-avro.md
  67. sql-data-sources-hive-tables.md
  68. sql-data-sources-jdbc.md
  69. sql-data-sources-json.md
  70. sql-data-sources-load-save-functions.md
  71. sql-data-sources-orc.md
  72. sql-data-sources-parquet.md
  73. sql-data-sources-troubleshooting.md
  74. sql-data-sources.md
  75. sql-distributed-sql-engine.md
  76. sql-getting-started.md
  77. sql-migration-guide-hive-compatibility.md
  78. sql-migration-guide-upgrade.md
  79. sql-migration-guide.md
  80. sql-performance-tuning.md
  81. sql-programming-guide.md
  82. sql-pyspark-pandas-with-arrow.md
  83. sql-reference.md
  84. storage-openstack-swift.md
  85. streaming-custom-receivers.md
  86. streaming-flume-integration.md
  87. streaming-kafka-0-10-integration.md
  88. streaming-kafka-0-8-integration.md
  89. streaming-kafka-integration.md
  90. streaming-kinesis-integration.md
  91. streaming-programming-guide.md
  92. structured-streaming-kafka-integration.md
  93. structured-streaming-programming-guide.md
  94. submitting-applications.md
  95. tuning.md
docs/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 https://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 correspond 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, Java, Python, R and SQL.

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 mkdocs
$ sudo Rscript -e 'install.packages(c("knitr", "devtools", "testthat", "rmarkdown"), repos="https://cloud.r-project.org/")'
$ sudo Rscript -e 'devtools::install_version("roxygen2", version = "5.0.1", repos="https://cloud.r-project.org/")'

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.

Note: Other versions of roxygen2 might work in SparkR documentation generation but RoxygenNote field in $SPARK_HOME/R/pkg/DESCRIPTION is 5.0.1, which is updated if the version is mismatched.

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 text files 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, Javadoc, Sphinx, roxygen2, MkDocs)

You can build just the Spark scaladoc and javadoc by running build/sbt unidoc from the $SPARK_HOME directory.

Similarly, you can build just the PySpark docs by running make html from the $SPARK_HOME/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_HOME/R/create-docs.sh, and the SQL docs can be built by running $SPARK_HOME/sql/create-docs.sh after building Spark first.

When you run jekyll build in the docs directory, it will also copy over the scaladoc and javadoc 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 and javadoc using Unidoc. The jekyll plugin also generates the PySpark docs using Sphinx, SparkR docs using roxygen2 and SQL docs using MkDocs.

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