Authored by BuddyJack

Fix

@@ -48,3 +48,26 @@ mkdir -p /home/hadoop/logs @@ -48,3 +48,26 @@ mkdir -p /home/hadoop/logs
48 48
49 hdfs dfs -rm -r "/spark/checkpoint/${app_name}" 49 hdfs dfs -rm -r "/spark/checkpoint/${app_name}"
50 eval "${spark_cmd}" 50 eval "${spark_cmd}"
  51 +
  52 +
  53 +RES=1
  54 +for i in {1..3}
  55 +do
  56 + sleep 20
  57 + i21=`yarn application -list|grep -w "${app_name}"|awk '{print $6}'`
  58 + if [ "_$i21" == "_RUNNING" ];then
  59 + process=$(ps -ef |grep "${app_name}" |grep '/bin/java' |grep -v grep)
  60 + if [ '_${process}' != '_' ];then
  61 + echo "${process}"
  62 + #kill -9 ${process}
  63 + fi
  64 + RES=1
  65 + break
  66 + fi
  67 + RES=0
  68 +done
  69 +
  70 +if [ ${RES} -ne 1 ];then
  71 + exit 1
  72 +fi
  73 +exit 0