Reputation: 3853
How to kill all filtered oozie jobs?
For example I want to kill all oozie jobs, with next condition:
oozie jobs -filter name=calculationx
Upvotes: 0
Views: 630
Reputation: 5260
This should work (note that there are some field missing, like Oozie host & ect'):
for jobId in `oozie jobs -filter name=calculationx | grep RUNNING | cut -d" " -f1`
do
echo "Killing job ${jobId}"
job -kill ${jobId}
done
Upvotes: 1