|
@@ -375,6 +375,16 @@ public class MRAppMaster extends CompositeService {
|
|
|
// this is the only job, so shut down the Appmaster
|
|
|
// note in a workflow scenario, this may lead to creation of a new
|
|
|
// job (FIXME?)
|
|
|
+ try {
|
|
|
+ LOG.info("Job end notification started for jobID : "
|
|
|
+ + job.getReport().getJobId());
|
|
|
+ JobEndNotifier notifier = new JobEndNotifier();
|
|
|
+ notifier.setConf(getConfig());
|
|
|
+ notifier.notify(job.getReport());
|
|
|
+ } catch (InterruptedException ie) {
|
|
|
+ LOG.warn("Job end notification interrupted for jobID : "
|
|
|
+ + job.getReport().getJobId(), ie );
|
|
|
+ }
|
|
|
|
|
|
// TODO:currently just wait for some time so clients can know the
|
|
|
// final states. Will be removed once RM come on.
|
|
@@ -390,16 +400,6 @@ public class MRAppMaster extends CompositeService {
|
|
|
stop();
|
|
|
|
|
|
// Send job-end notification
|
|
|
- try {
|
|
|
- LOG.info("Job end notification started for jobID : "
|
|
|
- + job.getReport().getJobId());
|
|
|
- JobEndNotifier notifier = new JobEndNotifier();
|
|
|
- notifier.setConf(getConfig());
|
|
|
- notifier.notify(job.getReport());
|
|
|
- } catch (InterruptedException ie) {
|
|
|
- LOG.warn("Job end notification interrupted for jobID : "
|
|
|
- + job.getReport().getJobId(), ie );
|
|
|
- }
|
|
|
} catch (Throwable t) {
|
|
|
LOG.warn("Graceful stop failed ", t);
|
|
|
}
|