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

Subroto Sanyal commented on MAPREDUCE-111:
------------------------------------------

Hi Amreshwari/Abhijit,

To call the public API *org.apache.hadoop.mapred.JobTracker.getSystemDir()* we 
must have the instance of *JobTracker*. When the call to *JobTracker* 
constructor is made, the constructor makes sure that *FileSystem* is 
initialized.

Please let me know if I am missing any point where *FileSystem* will not be 
initialized but, the *JobTracker* will be.

As per my understanding if we introduce such checks, we will end up making null 
checks in all public APIs leading to too much defensive coding.

> JobTracker.getSystemDir throws NPE if it is called during intialization
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-111
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-111
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: jobtracker
>            Reporter: Amareshwari Sriramadasu
>
> JobTracker.getSystemDir throws NPE if it is called during intialization.
> It should check if fileSystem is null and throw IllegalStateException, as in 
> getFilesystemName method.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to