1. 查看yarn任务日志
yarn logs -applicationId application_1517538889175_2550
2. 杀死yarn任务
yarn application -kill application_1585295380521_4957539
3. 重启任务
#!/bin/bash
source /etc/profile
jobid=`yarn application -list | grep ClientLogForSms | grep RUNNING | awk '{print $1}' | head -n 1`
# application_1619082024107_5536403
yarn application -kill $jobid
cd /data/zz/sms-service
sh start-sms-clientlog.sh