...
|
...
|
@@ -47,4 +47,27 @@ spark_cmd="nohup ${spark_home} --name ${app_name} ${app_args} --class ${app_mai |
|
|
mkdir -p /home/hadoop/logs
|
|
|
|
|
|
hdfs dfs -rm -r "/spark/checkpoint/${app_name}"
|
|
|
eval "${spark_cmd}" |
|
|
\ No newline at end of file |
|
|
eval "${spark_cmd}"
|
|
|
|
|
|
|
|
|
RES=1
|
|
|
for i in {1..3}
|
|
|
do
|
|
|
sleep 20
|
|
|
i21=`yarn application -list|grep -w "${app_name}"|awk '{print $6}'`
|
|
|
if [ "_$i21" == "_RUNNING" ];then
|
|
|
process=$(ps -ef |grep "${app_name}" |grep '/bin/java' |grep -v grep)
|
|
|
if [ '_${process}' != '_' ];then
|
|
|
echo "${process}"
|
|
|
#kill -9 ${process}
|
|
|
fi
|
|
|
RES=1
|
|
|
break
|
|
|
fi
|
|
|
RES=0
|
|
|
done
|
|
|
|
|
|
if [ ${RES} -ne 1 ];then
|
|
|
exit 1
|
|
|
fi
|
|
|
exit 0 |
...
|
...
|
|