--master |
master的地址久又,即提交任務(wù)在哪里執(zhí)行 |
spark://host:port涯穷,yarn, local急前,yarn-cluster等 |
--deploy-mode |
在本地 (client) 啟動(dòng) driver 或在 cluster 上啟動(dòng)纲堵,默認(rèn)是 client |
client蔬墩,cluster |
--class |
程序的主類(lèi)湖员,主要是Java或scala |
--classcom.lance.MyMain |
--name |
spark應(yīng)用程序名字 |
--name my-spark |
--jars |
spark依賴(lài)的jar跳仿,逗號(hào)分割 |
--jars /mysql-connector-java-5.1.27-bin.jar,hdfs:///user/lance/my.jar |
--packages |
包含在driver 和executor 的 classpath 中的 jar 的 maven 坐標(biāo) |
--packages com.lance.main |
--exclude-packages |
排除packages主要針對(duì)jar沖突 |
--exclude-packages com.lance.java.utils |
--repositories |
搜索packages的maven倉(cāng)庫(kù)地址 |
--repositories https://repo.maven.apache.org/maven2
|
--conf key=value |
設(shè)置spark 屬性值 |
--conf spark.speculation=true |
--properties-file |
加載配置文件,默認(rèn)為 conf/spark-defaults.conf |
--properties-file lance.conf |
--driver-memory |
設(shè)置Driver的內(nèi)存大小屑迂,默認(rèn)為1G |
--driver-memory 5G |
--driver-java-options |
傳給Driver的額外java選項(xiàng) |
--java-options evn=online |
--driver-library-path |
傳給Driver的額外的庫(kù)路徑 |
... |
--driver-class-path |
傳給Driver的額外的類(lèi)路徑 |
... |
--driver-cores |
設(shè)置Driver的核數(shù)浸策,默認(rèn)1,在yarn或者 standalone下使用 |
--driver-cores 5 |
--executor-memory |
每個(gè)executor的內(nèi)存惹盼,默認(rèn)1G |
--executor-memory 10G |
--total-executor-cores |
所有executor的總核數(shù)庸汗,僅僅在mesos 或者standalone下使用 |
--total-executor-cores 100 |
--num-executors |
啟動(dòng)了executor個(gè)數(shù),默認(rèn)2手报,在yarn中使用 |
--num-executors 100夫晌,設(shè)置的太多的話(huà)雕薪,隊(duì)列可能無(wú)法給予充分的資源。 |
--executor-core |
每個(gè)executor的核數(shù)晓淀,在yarn或者standalone下使用 |
--executor-core 5 |