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
JOB_LIST=$(hadoop job -list 2> /dev/null | grep job_ | awk '{print $1}')
for JOB in $JOB_LIST
do
hadoop job -kill $JOB
echo job (${JOB}) is killed now.
done