...
|
...
|
@@ -48,3 +48,26 @@ mkdir -p /home/hadoop/logs |
|
|
|
|
|
hdfs dfs -rm -r "/spark/checkpoint/${app_name}"
|
|
|
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 |
...
|
...
|
|