[
https://issues.apache.org/jira/browse/GOBBLIN-677?focusedWorklogId=198226&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-198226
]
ASF GitHub Bot logged work on GOBBLIN-677:
------------------------------------------
Author: ASF GitHub Bot
Created on: 13/Feb/19 17:29
Start Date: 13/Feb/19 17:29
Worklog Time Spent: 10m
Work Description: sv2000 commented on pull request #2548: [GOBBLIN-677] -
Allow early termination of Gobblin jobs based on a predicate on the job progress
URL: https://github.com/apache/incubator-gobblin/pull/2548#discussion_r256505082
##########
File path:
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/mapreduce/MRJobLauncher.java
##########
@@ -286,17 +316,57 @@ protected void runWorkUnits(List<WorkUnit> workUnits)
throws Exception {
@Override
protected void executeCancellation() {
- try {
- if (this.hadoopJobSubmitted && !this.job.isComplete()) {
- LOG.info("Killing the Hadoop MR job for job " +
this.jobContext.getJobId());
- this.job.killJob();
- // Collect final task states.
- this.taskStateCollectorService.stopAsync().awaitTerminated();
+ try (FiniteStateMachine<MRJobLauncherState>.Transition transition =
this.fsm.startTransition(MRJobLauncherState.CANCELLED)) {
+ if (transition.getStartState() == MRJobLauncherState.RUNNING) {
+ try {
+ LOG.info("Killing the Hadoop MR job for job " +
this.jobContext.getJobId());
+ this.job.killJob();
+ // Collect final task states.
+ this.taskStateCollectorService.stopAsync().awaitTerminated();
+ } catch (IOException ioe) {
+ LOG.error("Failed to kill the Hadoop MR job for job " +
this.jobContext.getJobId());
+ transition.changeEndState(MRJobLauncherState.FAILED);
+ }
+ }
+ } catch (FiniteStateMachine.UnallowedTransitionException |
InterruptedException exc) {
+ LOG.error("Failed to cancel job " + this.jobContext.getJobId(), exc);
+ }
+ }
+
+ /**
+ * Attempt a gracious interruptiong of the running job
Review comment:
Spelling error - interruption instead of interruptiong
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 198226)
Time Spent: 1h (was: 50m)
> Allow for early termination of Gobblin jobs based on a predicate on job
> progress
> --------------------------------------------------------------------------------
>
> Key: GOBBLIN-677
> URL: https://issues.apache.org/jira/browse/GOBBLIN-677
> Project: Apache Gobblin
> Issue Type: Improvement
> Reporter: Issac Buenrostro
> Assignee: Issac Buenrostro
> Priority: Major
> Time Spent: 1h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)