shell脚本传参执行spark-submit

Posted 最美的时光-

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了shell脚本传参执行spark-submit相关的知识,希望对你有一定的参考价值。

读取多个目录下的本地文件,多个目录通过循环遍历的方式,以参数传递:

#!/bin/bash

i=0
while [ $i -lt 10000 ]
do
echo "i=$i"
spark-submit --class com.link.fblx.readFromPath --driver-memory 20G --executor-memory 20G --num-executors 1 --executor-cores 25 --total-executor-cores 25 --jars jsoup-1.8.1.jar /root/sparkdemo_jar.jar file:///home/zl/data/$i/* /test/zl/fblx_link/20190109/output$i
((i++))
done







以上是关于shell脚本传参执行spark-submit的主要内容,如果未能解决你的问题,请参考以下文章

shell脚本传参执行spark-submit

MYSQL在脚本中使用变量-执行脚本时传参

Shell初学传参

第五章 shell函数的定义执行传参和递归函数

linux shell 脚本入门学习(一变量数组传参)

python--脚本传参与shell脚本传参(位置参数)