[ https://issues.apache.org/jira/browse/MAPREDUCE-5542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jason Lowe updated MAPREDUCE-5542: ---------------------------------- Affects Version/s: 0.23.9 Sample client log: {noformat} $ mapred job -kill job_1379617216746_0084 13/09/26 14:38:46 INFO client.RMProxy: Connecting to ResourceManager at xx/xx:xx 13/09/26 14:38:48 INFO mapred.ClientServiceDelegate: Application state is completed. FinalApplicationStatus=KILLED. Redirecting to job history server Exception in thread "main" java.lang.NullPointerException at org.apache.hadoop.mapred.YARNRunner.killJob(YARNRunner.java:563) at org.apache.hadoop.mapreduce.Job.killJob(Job.java:624) at org.apache.hadoop.mapreduce.tools.CLI.run(CLI.java:299) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84) at org.apache.hadoop.mapred.JobClient.main(JobClient.java:1231) {noformat} I believe the AM is active and the RM reports the app is running when the client first tries to obtain status to verify the job exists. However before YARNRunner.killJob is called by the client the AM unregisters and exits but fails to generate history data for the history server. Subsequent attempts to obtain job status will then be redirected to the history server and it will return null since it does not know about the job. YARNRunner.killJob needs to check for a null result each time it tries to obtain the job's current status. > 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 > > If a client tries to kill a job just as the job is finishing then the client > can crash with an NPE. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira