一、查询hadoop平台作业,执行命令
hadoop job -list
二、批量删除
方法1:
for i in `hadoop job -list | grep job_ |awk '{print $1}'`; do hadoop job -kill ${i}; done
方法2:
list=$(hadoop job -list 2> /dev/null | grep job_ | awk '{print $1}')
# kill all jobs
for job_id in $list
do
#hadoop job -kill $job_id
echo "${job_id} is killed"
done