提交作业

  1. ./bin/spark-submit --class org.apache.spark.examples.SparkPi \
  2. --master yarn \
  3. --deploy-mode cluster \
  4. --driver-memory 4g \
  5. --executor-memory 2g \
  6. --executor-cores 1 \
  7. --num-executors 2 \
  8. --queue thequeue \
  9. examples/jars/spark-examples*.jar \
  10. 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个。

配置

Shooting

Unable to move source

http://bcxw.net/article/196.html

编译打包

只区分Hadoop的Minor版本。
https://spark.apache.org/docs/2.1.2/building-spark.html