提交作业
./bin/spark-submit --class org.apache.spark.examples.SparkPi \
--master yarn \
--deploy-mode cluster \
--driver-memory 4g \
--executor-memory 2g \
--executor-cores 1 \
--num-executors 2 \
--queue thequeue \
examples/jars/spark-examples*.jar \
10
参数解释
Spark standalone and YARN only
—executor-cores
每个executor使用的core数,Spark on Yarn默认为1,standalone默认为worker上所有可用的core。
YARN-only
—driver-cores
driver使用的core,仅在cluster模式下,默认为1。
—queue
QUEUE_NAME 指定资源队列的名称,默认:default
—num-executors
一共启动的executor数量,默认是2个。
配置
Unable to move source
http://bcxw.net/article/196.html
编译打包
只区分Hadoop的Minor版本。
https://spark.apache.org/docs/2.1.2/building-spark.html