Description
Shutdown hook kills running jobs, but when running in Oozie launcher sometimes NodeManager can issue a SIGKILL after AM unregisters and before shutdown hook gets to execute causing orphaned jobs that continue to run. So it is better to kill when we see the InterruptedException.
Added additional System.err logging to code in shutdown hooks as LogManager.shutdown() is called by mapreduce AM (Oozie launcher job is mapreduce) and log4j logging does not appear anymore.