贴几个spark提交任务的小脚本

时间:2023-02-13 08:52:56

spark单个master节点的提交方式

spark-submit --master spark://hadoop-namenode-02:7077 \
--class com.dinpay.bdp.rcp.service.HzRuleBackendStat \
--deploy-mode cluster \
--conf spark.default.parallelism=10 \
--driver-memory 512m --driver-cores 1 \
--executor-memory 4g --executor-cores 4 \
--total-executor-cores 8 \
hdfs://bi/home/zhidun/Rcp-RuleEngine-Hz-0.0.1-SNAPSHOT.jar

 

spark的HA模式的提交方式

 spark-submit --master spark://fk-risk-spark-01:7077,fk-risk-spark-02:7077 \
  --class com.dinpay.bdp.rcp.service.StreamingStat \
  --deploy-mode cluster --supervise \
  --driver-memory 2g --driver-cores 1 \
  --executor-memory 8g --executor-cores 6 \
  --total-executor-cores 24 \
  hdfs://bi/home/dinpay/spark-normal-task-v1.0.0.jar