pyspark提交作业相关参数示例

作者:高景洋 日期:2021/02/02 14:30 浏览次数:155
# 提交方式(测试)
# spark-submit --master local[2] --num-executors 2 --executor-memory 1G --jars ./spark-examples_2.11-1.6.0-typesafe-001.jar /home/hadoop/script/test_hbase_dataframe.py

# 打包
# zip -r collect_py.zip *

# ---------------提交方式(正式) : 适用于Python3.7 和 Spark2.3+-------------------
# spark-submit \
# --name hbase_scan \
# --py-files /home/hadoop/collect_py/collect_py.zip \
# --master yarn \
# --jars /home/hadoop/spark-examples_2.11-1.6.0-typesafe-001.jar \
# --driver-memory 3g \
# --executor-memory 12g \
# --executor-cores 4 \
# --num-executors 14 \
# --conf spark.yarn.dist.archives=hdfs:///user/hadoop/python/env/python3.7.6.zip#python_env \
# --conf spark.pyspark.driver.python=/data/anaconda2/envs/hbase_scan/bin/python \
# --conf spark.pyspark.python=./python_env/hbase_scan/bin/python \
# --conf spark.task.cpus=1 \
# --conf spark.executorEnv.CLASSPATH="/usr/local/service/hive/spark/examples/jars/*:${CLASSPATH}" \
# /home/hadoop/collect_py/data_collect_py/apps/collect/schedule/spark_schedule.py
#-------------------------------------------------------------------------------

# ---------------提交方式(正式) : 适用于Python3.6 和 Spark2.2 当前跳板机上提交应使用该方式------
# spark-submit \
# --name hbase_scan \
# --py-files /home/hadoop/collect_py/collect_py.zip \
# --master yarn \
# --jars /home/hadoop/spark-examples_2.11-1.6.0-typesafe-001.jar \
# --driver-memory 3g \
# --executor-memory 10g \
# --executor-cores 10 \
# --num-executors 14 \
# --conf spark.yarn.dist.archives=hdfs:///user/hadoop/python/env/python3.6.12.zip#python_env \
# --conf spark.pyspark.driver.python=/data/anaconda2/envs/hbase_scan_36/bin/python \
# --conf spark.pyspark.python=./python_env/hbase_scan_36/bin/python \
# --conf spark.task.cpus=1 \
# --conf spark.executorEnv.CLASSPATH="/usr/local/service/hive/spark/examples/jars/*:${CLASSPATH}" \
# /home/hadoop/collect_py/data_collect_py/apps/collect/schedule/spark_schedule.py
#-------------------------------------------------------------------------------

# ---------------提交方式(正式) : 适用于Python3.6 和 Spark2.2 当前azkaban提交------
# spark-submit \
# --name hbase_scan \
# --py-files /home/hadoop/collect_py/collect_py.zip \
# --master yarn \
# --jars /home/hadoop/spark-examples_2.11-1.6.0-typesafe-001.jar \
# --driver-memory 3g \
# --executor-memory 10g \
# --executor-cores 10 \
# --num-executors 14 \
# --conf spark.yarn.dist.archives=hdfs:///user/hadoop/python/env/python3.6.12.zip#python_env \
# --conf spark.pyspark.driver.python=/data/anaconda2/envs/hbase_scan_36/bin/python \
# --conf spark.pyspark.python=./python_env/hbase_scan_36/bin/python \
# --conf spark.task.cpus=1 \
# --conf spark.sql.shuffle.partitions=280 \
# --conf spark.default.parallelism=280 \
# /home/hadoop/collect_py/data_collect_py/apps/collect/schedule/spark_schedule.py
#-------------------------------------------------------------------------------
本文永久性链接:
<a href="http://www.zhihu.so/art175.aspx">pyspark提交作业相关参数示例</a>
相关文章
友情链接
支付宝打赏(内容对您有帮助的话)
微信交流
知乎编程经验网 - 在工作中总结编程的经验! 备案/许可证编号:鲁ICP备11020152号
QQ:120217215 联系电话:15192695151