Marta
Marta

Reputation: 3853

Kill all filtered oozie jobs

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

Answers (1)

Mzf
Mzf

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

Related Questions