[ 
https://issues.apache.org/jira/browse/HADOOP-4236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12637445#action_12637445
 ] 

Amar Kamat commented on HADOOP-4236:
------------------------------------

bq. This patch should also have a fix for JobInProgress.kill() so that calling 
this on an uninitialized job kills the job completely.
This should have been taken care in HADOOP-4261. The task-initializer should 
call {{job.kill()}} which should do one of the 3 things
- {{garbageCollect()}} is the job has not _started_ (HADOOP-4261)
- mark for kill if the job is in _init_ (this issue)
- mark for cleanup if the job is _running_

Ideally there should be only one api to kill a job (say {{killJob()}}) which 
internally does the switching. Having 2 apis ({{killJob()}} and 
{{terminateJob()}}) is confusing. 

> JobTracker.killJob() fails to kill a job if the job is not yet initialized
> --------------------------------------------------------------------------
>
>                 Key: HADOOP-4236
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4236
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: mapred
>    Affects Versions: 0.19.0
>            Reporter: Amar Kamat
>            Assignee: Sharad Agarwal
>            Priority: Blocker
>             Fix For: 0.19.0
>
>
> HADOOP-3864 made the following changes to {{JobTracker.killJob()}}
> {code}
>    public synchronized void killJob(JobID jobid) {
>      JobInProgress job = jobs.get(jobid);
> -    job.kill();
> +    if (job.inited()) {
> +      job.kill();
> +    }
>    }
> {code}
> This is a bug as a job will not get killed if its not yet initialized.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to