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

Jonathan Eagles commented on MAPREDUCE-4117:
--------------------------------------------

My initial thought was the same as yours. However, in TypeConverter, you will 
see that both JobState.FAILED and JobState.ERROR are translated to 
JobStatus.State.FAILED. I believe it to be to much to assume that if 
JobStatus.State is FAILED, then you will be guaranteed to have either 1)a 
failed task completion event or 2) no task completion events at all. It is much 
more clear and simple to me to check for null in this case.
                
> mapred job -status throws NullPointerException
> ----------------------------------------------
>
>                 Key: MAPREDUCE-4117
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4117
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: client, mrv2
>    Affects Versions: 2.0.0, 3.0.0
>            Reporter: Devaraj K
>            Assignee: Devaraj K
>            Priority: Critical
>         Attachments: MAPREDUCE-4117.patch
>
>
> {code:xml}
> dev@ubuntudev-linux:~/hadoop/hadoop-trunk/bin$ ./mapred job -status 
> job_1333408894669_0001
> Exception in thread "main" java.lang.NullPointerException
>     at org.apache.hadoop.mapreduce.Job.getTaskFailureEventString(Job.java:512)
>     at org.apache.hadoop.mapreduce.Job.toString(Job.java:463)
>     at java.lang.String.valueOf(String.java:2838)
>     at java.io.PrintStream.println(PrintStream.java:788)
>     at org.apache.hadoop.mapreduce.tools.CLI.run(CLI.java:255)
>     at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:69)
>     at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:83)
>     at org.apache.hadoop.mapred.JobClient.main(JobClient.java:1244)
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to