submit.sh 1.0 KB

1234567891011121314151617181920212223242526272829
  1. sourceDIR=/workspace
  2. who=root
  3. YARN_QUEUE=
  4. DEPLOY_MODE=cluster
  5. ${SPARK_HOME}/bin/spark-submit \
  6. --master yarn \
  7. --name "spark_${ModelType}_${who}" \
  8. --deploy-mode ${DEPLOY_MODE} \
  9. --driver-memory 1g \
  10. --driver-cores 1 \
  11. --executor-memory 1g \
  12. --executor-cores 2 \
  13. --num-executors 1 \
  14. --archives ${sourceDIR}/py37.zip#python3env \
  15. --conf spark.default.parallelism=2 \
  16. --conf spark.executor.memoryOverhead=1g \
  17. --conf spark.driver.memoryOverhead=1g \
  18. --conf spark.yarn.maxAppAttempts=3 \
  19. --conf spark.yarn.submit.waitAppCompletion=true \
  20. --conf spark.pyspark.driver.python=python3env/py37/bin/python \
  21. --conf spark.yarn.appMasterEnv.PYSPARK_PYTHON=python3env/py37/bin/python \
  22. --conf spark.pyspark.python=python3env/py37/bin/python \
  23. --files "${sourceDIR}/yl-jinghui/demo.yml#demo.yml,${sourceDIR}/yl-jinghui/t_order_demo.csv#t_order_demo.csv" \
  24. ./main.py
  25. # --conf spark.yarn.appMasterEnv.CLASSPATH="$CLASSPATH:/opt/cloudera/parcels/CDH/lib/hadoop-mapreduce/*:$HADOOP_COMMON_HOME/lib/*" \