[ 
https://issues.apache.org/jira/browse/MAPREDUCE-5542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14169920#comment-14169920
 ] 

Jason Lowe commented on MAPREDUCE-5542:
---------------------------------------

Thanks for updating the patch, Rohith!  Comments:

Is there a scenario where we can still get an NPE?  I don't think it's supposed 
to happen, but I'm wondering if the app is still running and we send it a bad 
jobID or for some reason it can't lookup the job ID then YARN will think it's 
running and we still will NPE on the null status.  Wondering if we should just 
simplify this to if the status is null and YARN thinks the application is 
running then we should kill the app via YARN rather than via the AM.  In other 
words, if status==null then we either doing nothing (YARN says app is finished) 
or we kill it via the RM (YARN says app is not finished).

Nit: The isApplicationFinished method name is confusing since it can return 
true for applications that are finished and happen to have a non-null job 
status.

Nit: The applicationStatus local in isApplicationFinished makes the code harder 
to read, as it is never assigned except during initialization, and we return 
the NOT of it in some places.  Would be much easier to read if we just used 
literal true/false instead of a proxy variable that's never updated to anything 
but false.

> Killing a job just as it finishes can generate an NPE in client
> ---------------------------------------------------------------
>
>                 Key: MAPREDUCE-5542
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-5542
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: client, mrv2
>    Affects Versions: 2.1.0-beta, 0.23.9
>            Reporter: Jason Lowe
>            Assignee: Rohith
>         Attachments: MAPREDUCE-5542.1.patch, MAPREDUCE-5542.2.patch, 
> MAPREDUCE-5542.3.patch
>
>
> If a client tries to kill a job just as the job is finishing then the client 
> can crash with an NPE.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to