Remove fs operations when Azkaban shutdownHook is called
@@ -207,10 +207,11 @@ public class AzkabanJobLauncher extends AbstractJob implements ApplicationLaunch
LOG.info("Cancelling job since SLA is reached: " + this.ownAzkabanSla);
future.cancel(true);
isCancelled = true;
- this.cancel();
+ this.cancelJob(jobListener);
} finally {
service.shutdown();
if (isCancelled) {
+ this.cancel();
// Need to fail the Azkaban job.
throw new RuntimeException("Job failed because it reaches SLA limit: " + this.ownAzkabanSla);
}
@@ -238,16 +239,12 @@ public class AzkabanJobLauncher extends AbstractJob implements ApplicationLaunch
@Override
public void cancel()
throws Exception {
- try {
- cancelJob(this.jobListener);
- } finally {
try {
stop();
} finally {
close();
}
}
- }
@Override
public void start()
