Spark2.3(三十六):根据appName验证某个app是否在运行

具体脚本

#/bin/sh
#LANG=zh_CN.utf8
#export LANG
export SPARK_KAFKA_VERSION=0.10
export LANG=zh_CN.UTF-8

# export env variable
if [ -f ~/.bash_profile ];
then
source ~/.bash_profile
fi
source /etc/profile


myAppName='SPARK APP NAME'
apps=''

for app in `yarn application -list`
do
  apps=${app},$apps
done

apps=${apps%?}


if [[ $apps =~ $myAppName ]]
then
  echo "included"
else
  echo "not included,do submit...."
    ./submit_x1_x2.sh abc TestRestartDriver
fi

 

    原文作者:spark
    原文地址: https://www.cnblogs.com/yy3b2007com/p/10107084.html
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞