You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Hemanth Yamijala (JIRA)" <ji...@apache.org> on 2008/10/15 18:05:44 UTC

[jira] Commented: (HADOOP-4419) JobTracker.setJobPriority() doesn't check for a jobID lookup failing

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

Hemanth Yamijala commented on HADOOP-4419:
------------------------------------------

I verified that when the setJobPriority or killJob (see HADOOP-4420) are called from the hadoop cli, a check is made to see if the job exists, and then the operation is launched. If the job doesn't exist, the operation fails with a message like "Could not find job ...". 

That said, there is a window of a chance when after the check, and before the request is submitted, the job is removed. Hence +1 for checking the validity of the job in the two methods.

> JobTracker.setJobPriority() doesn't check for a jobID lookup failing
> --------------------------------------------------------------------
>
>                 Key: HADOOP-4419
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4419
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: mapred
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Steve Loughran
>            Priority: Minor
>
> Looking at the entry points of the JobTracker API, it seems that JobTracker.setJobPriority()  doesnt expect the JobID lookup ever to return null
> It goes straight from lookup to checking access, an operation that assumes that job!=null
>     JobInProgress job = jobs.get(jobid);
>     checkAccess(job, QueueManager.QueueOperation.ADMINISTER_JOBS);
> Recommend: add a test that calls this operaton with an invalid jobID, then fix the code as appropriate

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