4e1ded67f8
### What changes were proposed in this pull request? This PR is a follow-up of #29781 to fix broken link and typo. <img width="638" alt="Screen Shot 2020-10-07 at 3 56 28 PM" src="https://user-images.githubusercontent.com/44108233/95297583-aa0ccb00-08b5-11eb-85db-89022c76d7e1.png"> <img width="734" alt="Screen Shot 2020-10-07 at 3 55 36 PM" src="https://user-images.githubusercontent.com/44108233/95297508-8ba6cf80-08b5-11eb-9caa-0b52a2482ada.png"> ### Why are the changes needed? Current link is not working properly because of wrong path. ### Does this PR introduce _any_ user-facing change? Yes, the link is working properly now. ### How was this patch tested? Manually built the doc. Closes #29963 from itholic/SPARK-32189-FOLLOWUP. Authored-by: itholic <haejoon309@naver.com> Signed-off-by: HyukjinKwon <gurwls223@apache.org>
63 lines
2.5 KiB
ReStructuredText
63 lines
2.5 KiB
ReStructuredText
.. 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.
|
|
|
|
===============
|
|
Setting up IDEs
|
|
===============
|
|
|
|
|
|
PyCharm
|
|
-------
|
|
|
|
This section describes how to setup PySpark on PyCharm.
|
|
It guides step by step to the process of downloading the source code from GitHub and running the test code successfully.
|
|
|
|
Firstly, download the Spark source code from GitHub using git url. You can download the source code by simply using ``git clone`` command as shown below.
|
|
If you want to download the code from any forked repository rather than Spark original repository, please change the url properly.
|
|
|
|
.. code-block:: bash
|
|
|
|
git clone https://github.com/apache/spark.git
|
|
|
|
When the download is completed, go to the ``spark`` directory and build the package.
|
|
SBT build is generally much faster than Maven. More details about the build are documented `here <https://spark.apache.org/docs/latest/building-spark.html>`_.
|
|
|
|
.. code-block:: bash
|
|
|
|
build/sbt package
|
|
|
|
After building is finished, run PyCharm and select the path ``spark/python``.
|
|
|
|
.. image:: ../../../../docs/img/pycharm-with-pyspark1.png
|
|
:alt: Select the Spark path
|
|
|
|
|
|
Let's go to the path ``python/pyspark/tests`` in PyCharm and try to run the any test like ``test_join.py``.
|
|
You might can see the ``KeyError: 'SPARK_HOME'`` because the environment variable has not been set yet.
|
|
|
|
Go **Run -> Edit Configurations**, and set the environment variables as below.
|
|
Please make sure to specify your own path for ``SPARK_HOME`` rather than ``/.../spark``. After completing the variable, click **OK** to apply the changes.
|
|
|
|
.. image:: ../../../../docs/img/pycharm-with-pyspark2.png
|
|
:alt: Setting up SPARK_HOME
|
|
|
|
|
|
Once ``SPARK_HOME`` is set properly, you'll be able to run the tests properly as below:
|
|
|
|
.. image:: ../../../../docs/img/pycharm-with-pyspark3.png
|
|
:alt: Running tests properly
|