hadoop批量杀死job

循环遍历出yarn中的application,过滤出ACCEPTED或RUNNING等状态并选出想要的前缀,执行kill命令

1
for i in  `sudo -u pphive yarn application  -list | grep -w  ACCEPTED | awk '{print $1}' | grep application_`; do sudo -u pphive yarn  application -kill $i; done