You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Rohith (JIRA)" <ji...@apache.org> on 2014/02/25 04:19:23 UTC
[jira] [Commented] (MAPREDUCE-5542) Killing a job just as it
finishes can generate an NPE in client
[ https://issues.apache.org/jira/browse/MAPREDUCE-5542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13911186#comment-13911186 ]
Rohith commented on MAPREDUCE-5542:
-----------------------------------
There are 2 solution we can solve.
1. Just have null check and return with log warning "No Jobs to kill".
JobStatus status = clientCache.getClient(arg0).getJobStatus(arg0);
if (status == null) {
LOG.warn("Attempting to Kill Job which is Not Running.");
return;
}
2. Maintain consistency acros other API's such as org.apache.hadoop.mapreduce.Job.updateStatus().
JobStatus status = clientCache.getClient(arg0).getJobStatus(arg0);
if (status == null) {
throw new IOException("Job status not available ");
}
I prefer to have 2nd, let client handle this exception.
> 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
>
> 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.1.5#6160)