Search code examples
oozieoozie-coordinator

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

Solution

  • 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