tree: 02bb7dbdfc2e12fee666707f2b84d96e27048415 [path history] [tgz]
  1. .bundle/
  2. _data/
  3. _includes/
  4. _layouts/
  5. _plugins/
  6. css/
  7. img/
  8. js/
  9. util/
  10. .gitignore
  11. 404.md
  12. _config.yml
  13. building-spark.md
  14. cloud-integration.md
  15. cluster-overview.md
  16. configuration.md
  17. core-migration-guide.md
  18. Gemfile
  19. Gemfile.lock
  20. graphx-programming-guide.md
  21. hadoop-provided.md
  22. hardware-provisioning.md
  23. index.md
  24. job-scheduling.md
  25. migration-guide.md
  26. ml-advanced.md
  27. ml-ann.md
  28. ml-classification-regression.md
  29. ml-clustering.md
  30. ml-collaborative-filtering.md
  31. ml-datasource.md
  32. ml-decision-tree.md
  33. ml-ensembles.md
  34. ml-features.md
  35. ml-frequent-pattern-mining.md
  36. ml-guide.md
  37. ml-linalg-guide.md
  38. ml-linear-methods.md
  39. ml-migration-guide.md
  40. ml-pipeline.md
  41. ml-statistics.md
  42. ml-survival-regression.md
  43. ml-tuning.md
  44. mllib-classification-regression.md
  45. mllib-clustering.md
  46. mllib-collaborative-filtering.md
  47. mllib-data-types.md
  48. mllib-decision-tree.md
  49. mllib-dimensionality-reduction.md
  50. mllib-ensembles.md
  51. mllib-evaluation-metrics.md
  52. mllib-feature-extraction.md
  53. mllib-frequent-pattern-mining.md
  54. mllib-guide.md
  55. mllib-isotonic-regression.md
  56. mllib-linear-methods.md
  57. mllib-naive-bayes.md
  58. mllib-optimization.md
  59. mllib-pmml-model-export.md
  60. mllib-statistics.md
  61. monitoring.md
  62. programming-guide.md
  63. pyspark-migration-guide.md
  64. quick-start.md
  65. rdd-programming-guide.md
  66. README.md
  67. running-on-kubernetes.md
  68. running-on-yarn.md
  69. security.md
  70. spark-connect-overview.md
  71. spark-standalone.md
  72. sparkr-migration-guide.md
  73. sparkr.md
  74. sql-data-sources-avro.md
  75. sql-data-sources-binaryFile.md
  76. sql-data-sources-csv.md
  77. sql-data-sources-generic-options.md
  78. sql-data-sources-hive-tables.md
  79. sql-data-sources-jdbc.md
  80. sql-data-sources-json.md
  81. sql-data-sources-load-save-functions.md
  82. sql-data-sources-orc.md
  83. sql-data-sources-parquet.md
  84. sql-data-sources-protobuf.md
  85. sql-data-sources-text.md
  86. sql-data-sources-troubleshooting.md
  87. sql-data-sources-xml.md
  88. sql-data-sources.md
  89. sql-distributed-sql-engine-spark-sql-cli.md
  90. sql-distributed-sql-engine.md
  91. sql-error-conditions-codec-not-available-error-class.md
  92. sql-error-conditions-collation-mismatch-error-class.md
  93. sql-error-conditions-failed-read-file-error-class.md
  94. sql-error-conditions-illegal-state-store-value-error-class.md
  95. sql-error-conditions-invalid-aggregate-filter-error-class.md
  96. sql-error-conditions-invalid-conf-value-error-class.md
  97. sql-error-conditions-invalid-datetime-pattern-error-class.md
  98. sql-error-conditions-invalid-delimiter-value-error-class.md
  99. sql-error-conditions-invalid-interval-format-error-class.md
  100. sql-error-conditions-numeric-value-out-of-range-error-class.md
  101. sql-error-conditions-syntax-discontinued-error-class.md
  102. sql-error-conditions-unsupported-call-error-class.md
  103. sql-error-conditions-unsupported-collation-error-class.md
  104. sql-error-conditions.md
  105. sql-getting-started.md
  106. sql-migration-guide.md
  107. sql-performance-tuning.md
  108. sql-programming-guide.md
  109. sql-pyspark-pandas-with-arrow.md
  110. sql-ref-ansi-compliance.md
  111. sql-ref-datatypes.md
  112. sql-ref-datetime-pattern.md
  113. sql-ref-function-invocation.md
  114. sql-ref-functions-builtin.md
  115. sql-ref-functions-udf-aggregate.md
  116. sql-ref-functions-udf-hive.md
  117. sql-ref-functions-udf-scalar.md
  118. sql-ref-functions.md
  119. sql-ref-identifier-clause.md
  120. sql-ref-identifier.md
  121. sql-ref-literals.md
  122. sql-ref-null-semantics.md
  123. sql-ref-number-pattern.md
  124. sql-ref-syntax-aux-analyze-table.md
  125. sql-ref-syntax-aux-cache-cache-table.md
  126. sql-ref-syntax-aux-cache-clear-cache.md
  127. sql-ref-syntax-aux-cache-refresh-function.md
  128. sql-ref-syntax-aux-cache-refresh-table.md
  129. sql-ref-syntax-aux-cache-refresh.md
  130. sql-ref-syntax-aux-cache-uncache-table.md
  131. sql-ref-syntax-aux-cache.md
  132. sql-ref-syntax-aux-conf-mgmt-reset.md
  133. sql-ref-syntax-aux-conf-mgmt-set-timezone.md
  134. sql-ref-syntax-aux-conf-mgmt-set.md
  135. sql-ref-syntax-aux-conf-mgmt.md
  136. sql-ref-syntax-aux-describe-database.md
  137. sql-ref-syntax-aux-describe-function.md
  138. sql-ref-syntax-aux-describe-query.md
  139. sql-ref-syntax-aux-describe-table.md
  140. sql-ref-syntax-aux-describe.md
  141. sql-ref-syntax-aux-exec-imm.md
  142. sql-ref-syntax-aux-resource-mgmt-add-archive.md
  143. sql-ref-syntax-aux-resource-mgmt-add-file.md
  144. sql-ref-syntax-aux-resource-mgmt-add-jar.md
  145. sql-ref-syntax-aux-resource-mgmt-list-archive.md
  146. sql-ref-syntax-aux-resource-mgmt-list-file.md
  147. sql-ref-syntax-aux-resource-mgmt-list-jar.md
  148. sql-ref-syntax-aux-resource-mgmt.md
  149. sql-ref-syntax-aux-set-var.md
  150. sql-ref-syntax-aux-show-columns.md
  151. sql-ref-syntax-aux-show-create-table.md
  152. sql-ref-syntax-aux-show-databases.md
  153. sql-ref-syntax-aux-show-functions.md
  154. sql-ref-syntax-aux-show-partitions.md
  155. sql-ref-syntax-aux-show-table.md
  156. sql-ref-syntax-aux-show-tables.md
  157. sql-ref-syntax-aux-show-tblproperties.md
  158. sql-ref-syntax-aux-show-views.md
  159. sql-ref-syntax-aux-show.md
  160. sql-ref-syntax-ddl-alter-database.md
  161. sql-ref-syntax-ddl-alter-table.md
  162. sql-ref-syntax-ddl-alter-view.md
  163. sql-ref-syntax-ddl-create-database.md
  164. sql-ref-syntax-ddl-create-function.md
  165. sql-ref-syntax-ddl-create-table-datasource.md
  166. sql-ref-syntax-ddl-create-table-hiveformat.md
  167. sql-ref-syntax-ddl-create-table-like.md
  168. sql-ref-syntax-ddl-create-table.md
  169. sql-ref-syntax-ddl-create-view.md
  170. sql-ref-syntax-ddl-declare-variable.md
  171. sql-ref-syntax-ddl-drop-database.md
  172. sql-ref-syntax-ddl-drop-function.md
  173. sql-ref-syntax-ddl-drop-table.md
  174. sql-ref-syntax-ddl-drop-variable.md
  175. sql-ref-syntax-ddl-drop-view.md
  176. sql-ref-syntax-ddl-repair-table.md
  177. sql-ref-syntax-ddl-truncate-table.md
  178. sql-ref-syntax-ddl-usedb.md
  179. sql-ref-syntax-dml-insert-overwrite-directory.md
  180. sql-ref-syntax-dml-insert-table.md
  181. sql-ref-syntax-dml-load.md
  182. sql-ref-syntax-hive-format.md
  183. sql-ref-syntax-qry-explain.md
  184. sql-ref-syntax-qry-select-aggregate.md
  185. sql-ref-syntax-qry-select-case.md
  186. sql-ref-syntax-qry-select-clusterby.md
  187. sql-ref-syntax-qry-select-cte.md
  188. sql-ref-syntax-qry-select-distribute-by.md
  189. sql-ref-syntax-qry-select-file.md
  190. sql-ref-syntax-qry-select-groupby.md
  191. sql-ref-syntax-qry-select-having.md
  192. sql-ref-syntax-qry-select-hints.md
  193. sql-ref-syntax-qry-select-inline-table.md
  194. sql-ref-syntax-qry-select-join.md
  195. sql-ref-syntax-qry-select-lateral-subquery.md
  196. sql-ref-syntax-qry-select-lateral-view.md
  197. sql-ref-syntax-qry-select-like.md
  198. sql-ref-syntax-qry-select-limit.md
  199. sql-ref-syntax-qry-select-offset.md
  200. sql-ref-syntax-qry-select-orderby.md
  201. sql-ref-syntax-qry-select-pivot.md
  202. sql-ref-syntax-qry-select-sampling.md
  203. sql-ref-syntax-qry-select-setops.md
  204. sql-ref-syntax-qry-select-sortby.md
  205. sql-ref-syntax-qry-select-subqueries.md
  206. sql-ref-syntax-qry-select-transform.md
  207. sql-ref-syntax-qry-select-tvf.md
  208. sql-ref-syntax-qry-select-unpivot.md
  209. sql-ref-syntax-qry-select-where.md
  210. sql-ref-syntax-qry-select-window.md
  211. sql-ref-syntax-qry-select.md
  212. sql-ref-syntax-qry-star.md
  213. sql-ref-syntax.md
  214. sql-ref.md
  215. ss-migration-guide.md
  216. storage-openstack-swift.md
  217. streaming-custom-receivers.md
  218. streaming-kafka-0-10-integration.md
  219. streaming-kafka-integration.md
  220. streaming-kinesis-integration.md
  221. streaming-programming-guide.md
  222. structured-streaming-kafka-integration.md
  223. structured-streaming-programming-guide.md
  224. structured-streaming-state-data-source.md
  225. submitting-applications.md
  226. tuning.md
  227. web-ui.md
docs/README.md

license: | Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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 3 and Python 3 installed. Make sure the bundle command is available. If not, install it as follows:

$ gem install bundler

After this all the required Ruby dependencies can be installed from the docs/ directory via Bundler:

$ cd "$SPARK_HOME"/docs
$ bundle install

And the required Python dependencies can be installed using pip:

$ cd "$SPARK_HOME"
$ pip install --upgrade -r dev/requirements.txt

To generate the Python or R API docs, you'll also need to install Pandoc.

R API Documentation (Optional)

If you'd like to generate R API documentation, install these libraries:

$ sudo Rscript -e 'install.packages(c("knitr", "devtools", "testthat", "rmarkdown"), repos="https://cloud.r-project.org/")'
$ sudo Rscript -e 'devtools::install_version("roxygen2", version = "7.1.2", repos="https://cloud.r-project.org/")'
$ sudo Rscript -e "devtools::install_version('pkgdown', version='2.0.1', repos='https://cloud.r-project.org')"
$ sudo Rscript -e "devtools::install_version('preferably', version='0.4', repos='https://cloud.r-project.org')"

Note: Other versions of roxygen2 might work in SparkR documentation generation but RoxygenNote field in $SPARK_HOME/R/pkg/DESCRIPTION is 7.1.2, 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 SKIP_API=1 bundle exec 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
# Skip generating API docs (which takes a while)
$ SKIP_API=1 bundle exec jekyll build

You can also generate the default Jekyll build with API Docs as follows:

$ bundle exec jekyll build

# Serve content locally on port 4000
$ bundle exec jekyll serve --watch

# Build the site with extra features used on the live page
$ PRODUCTION=1 bundle exec 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 bundle exec 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.

To control what API docs get built, you can set any combination of the following shell variables before you run bundle exec jekyll build:

  • SKIP_API=1: Skip building all the API docs.
  • SKIP_SCALADOC=1: Skip the Scala and Java API docs.
  • SKIP_PYTHONDOC=1: Skip the Python API docs.
  • SKIP_RDOC=1: Skip the R API docs.
  • SKIP_SQLDOC=1: Skip the SQL API docs.