基本命令和参数
- 提交基本命令
./bin/spark-submit \ --master <master-url> \ --deploy-mode <deploy-mode> \ --conf <key<=<value> \ --driver-memory <value>g \ --executor-memory <value>g \ --executor-cores <number of cores> \ --py-files file1.py,file2.py,file3.zip, file4.egg \ test.py [application-arguments]
- 参数详解
- master
指定Spark应用程序运行的集群管理器,可以是local(本地模式),yarn(YARN集群管理器)或mesos(Mesos集群管理器)。例如,–master yarn。 - deploy-mode
指定应用程序的部署模式,可以是client(在驱动程序所在的主机上运行应用程序)或cluster(在集群中的节点上运行应用程序)。例如,–deploy-mode cluster。 - num-executors
指定应用程序运行