kill 掉所有正在运行的hadoop jobs

get list of job's process IDs

JOB_LIST=$(hadoop job -list 2> /dev/null | grep job_ | awk '{print $1}')

kill all jobs

for JOB in $JOB_LIST
do
        hadoop job -kill $JOB
        echo job (${JOB}) is killed now.
done
posted @ 2017-03-24 09:49  chaplinthink  阅读(226)  评论(0编辑  收藏  举报