[ https://issues.apache.org/jira/browse/MAPREDUCE-5542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14175032#comment-14175032 ]
Jason Lowe commented on MAPREDUCE-5542: --------------------------------------- bq. I think because of method name,it was being confused. But IIUC , It will return true if Job is not in terminal states(KILLED/FAILED/SUCCEDED). Once Job reaches terminal states(killed/failed/succeded), it return false. The original isJobFinished method in the patch will always return true because it is checking if a value is not equal to three different values and OR-ing the results. Any single value will always be unequal to at least two of the three values, so it will always return true. The original method should have used && instead of || to return false if the job was finished and true if it wasn't (despite the name). bq. is below code OK? Yes, that code should do what we want. A small nit that the parentheses around !isJobInTerminalState just adds noise to the line. > 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, MAPREDUCE-5542.4.patch, MAPREDUCE-5542.5.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)