Blazer-007 commented on code in PR #4097:
URL: https://github.com/apache/gobblin/pull/4097#discussion_r1955659676
##########
gobblin-temporal/src/main/java/org/apache/gobblin/temporal/joblauncher/GobblinJobLauncher.java:
##########
@@ -137,7 +137,9 @@ public GobblinJobLauncher(Properties jobProps, Path
appWorkDir,
@Override
public void close() throws IOException {
try {
- executeCancellation();
+ cancelJob(jobListener);
+ } catch (Exception e) {
+ log.error("Exception occurred while cancelling job", e);
} finally {
try {
cleanupWorkingDirectory();
Review Comment:
While closing why the full job needs to be canceled ?
Is the `close()` only called while cancelling , also is it possible to add
something like what [MRJobLauncher
does](https://github.com/apache/gobblin/blob/master/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/mapreduce/MRJobLauncher.java#L289)
```
@Override
public void close() throws IOException {
try {
if (this.hadoopJobSubmitted && !this.job.isComplete()) {
LOG.info("Killing the Hadoop MR job for job " +
this.jobContext.getJobId());
this.job.killJob();
}
} finally {
try {
cleanUpWorkingDirectory();
} finally {
super.close();
fs.close();
}
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]