Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
2.3.0
-
None
-
None
-
None
Description
I found YARNRunner.killJob(JobID arg0) can throw NullPointerException if job status is null.
clientCache.getClient(arg0).getJobStatus(arg0); can be null.
This can happen when there is history write is failed because of hdfs errors or staging directory is different from history server..
We need to have null check otherwise killJob() is prone to throw NPE which cause joblient to exit.
@Override public void killJob(JobID arg0) throws IOException, InterruptedException { /* check if the status is not running, if not send kill to RM */ JobStatus status = clientCache.getClient(arg0).getJobStatus(arg0); if (status.getState() != JobStatus.State.RUNNING) { try { resMgrDelegate.killApplication(TypeConverter.toYarn(arg0).getAppId()); } catch (YarnException e) { throw new IOException(e); } return; } ....... ...... ....... }
Attachments
Issue Links
- duplicates
-
MAPREDUCE-5542 Killing a job just as it finishes can generate an NPE in client
- Closed