scala - 提交作业时,spark-submit 中使用的参数是否有特定顺序?
问题描述
我正在尝试使用 spark-submit 提交火花作业,如下所示:
> SPARK_MAJOR_VERSION=2 spark-submit --conf spark.ui.port=4090
> --driver-class-path /home/devusr/jars/greenplum-spark_2.11-1.3.0.jar --jars /home/devusr/jars/greenplum-spark_2.11-1.3.0.jar --executor-cores 3 --executor-memory 13G --class com.partition.source.YearPartition splinter_2.11-0.1.jar --master=yarn
> --keytab /home/devusr/devusr.keytab --principal devusr@DEV.COM --files /usr/hdp/current/spark2-client/conf/hive-site.xml,testconnection.properties
> --name Splinter --conf spark.executor.extraClassPath=/home/devusr/jars/greenplum-spark_2.11-1.3.0.jar
> --conf spark.executor.instances=10 --conf spark.dynamicAllocation.enabled=false --conf
> spark.files.maxPartitionBytes=256M
但是作业没有运行,而是打印:
SPARK_MAJOR_VERSION is set to 2, using Spark2
谁能告诉我 spark-submit 中使用的参数是否有任何特定顺序?
解决方案
spark-submit
在cluster
模式下yarn
使用
的格式$ ./bin/spark-submit --class path.to.your.Class --master yarn --deploy-mode cluster [options] <app jar> [app options]
记录在https://spark.apache.org/docs/2.1.0/running-on-yarn.html
如果splinter_2.11-0.1.jar
是包含你的类的 jar,你com.partition.source.YearPartition
可以尝试使用这个:
spark-submit \
--class com.partition.source.YearPartition \
--master=yarn \
--conf spark.ui.port=4090 \
--driver-class-path /home/devusr/jars/greenplum-spark_2.11-1.3.0.jar \
--jars /home/devusr/jars/greenplum-spark_2.11-1.3.0.jar \
--executor-cores 3 \
--executor-memory 13G \
--keytab /home/devusr/devusr.keytab \
--principal devusr@DEV.COM \
--files /usr/hdp/current/spark2-client/conf/hive-site.xml,testconnection.properties \
--name Splinter \
--conf spark.executor.extraClassPath=/home/devusr/jars/greenplum-spark_2.11-1.3.0.jar \
--conf spark.executor.instances=10 \
--conf spark.dynamicAllocation.enabled=false \
--conf spark.files.maxPartitionBytes=256M \
splinter_2.11-0.1.jar
推荐阅读
- airflow - 通过 WebUI 触发时,Airflow DAG 会因 RecursionError 而爆炸
- r - 自定义自动 R Markdown 报告
- php - Docker MySQL mysqli::real_connect():(HY000/2002):连接被拒绝
- python - Python + CPLEX:没有名为“docplex”的模块
- django - Django CreateView - 只允许创建 n 个对象。达到限制时重定向
- c# - 使用外部模型引用访问 WCF 服务的 Swagger UI 时出错
- python - 如果在 1/100 秒内请求相同的烧瓶 api,则插入后 sqlalchemy 不会更新
- python - 尝试用一个数据帧的元素做最少 2 个数据帧
- ios - 打印 tableview 的计数时出现问题
- c# - 如何将 excel 公式转换为 List 或 somestrongtype