Hướng dẫn spark-submit python file

How to submit a Python file [.py] with PySpark code to Spark submit? spark-submit is used to submit the Spark applications written in Scala, Java, R, and Python to cluster. In this article, I will cover a few examples of how to submit a python [.py] file by using several options and configurations.

Apache Spark binary comes with spark-submit.sh script file for Linux, Mac, and spark-submit.cmd command file for windows, these scripts are available at $SPARK_HOME/bin directory which is used to submit the PySpark file with .py extension [Spark with python] to the cluster.

Below is a simple spark-submit command to run python file with the most-used command options.


./bin/spark-submit \
  --master  \
  --deploy-mode  \
  --conf 

Chủ Đề