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

Brahma Reddy Battula commented on HADOOP-8436:
----------------------------------------------


{code}
String newLocalDirs = conf.get(contextCfgItemName);
if (!newLocalDirs.equals(savedLocalDirs)) {
                                int minDiskFreeThresholdMb = 
conf.getInt("hadoop.min.local.disk.freespace.threshold", 1024);
{code}

Here newLocalDirs will become null and it'll throw NPE..

I did fix like this..

{code}
  String newLocalDirs = conf.get(contextCfgItemName);
                        if (null == newLocalDirs) {
                                throw new IOException("dfs.client.buffer.dir 
not configured");
                        }
      if (!newLocalDirs.equals(savedLocalDirs) ) {
        localDirs = StringUtils.getTrimmedStrings(newLocalDirs);
{code}
                
> NPE In getLocalPathForWrite ( path, conf ) when dfs.client.buffer.dir not 
> configured
> ------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8436
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8436
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 2.0.0-alpha, 3.0.0
>            Reporter: Brahma Reddy Battula
>
> Call  dirAllocator.getLocalPathForWrite ( path , conf );
> without configuring  "dfs.client.buffer.dir"..
> {noformat}
> java.lang.NullPointerException
>       at 
> org.apache.hadoop.fs.LocalDirAllocator$AllocatorPerContext.confChanged(LocalDirAllocator.java:261)
>       at 
> org.apache.hadoop.fs.LocalDirAllocator$AllocatorPerContext.getLocalPathForWrite(LocalDirAllocator.java:365)
>       at 
> org.apache.hadoop.fs.LocalDirAllocator.getLocalPathForWrite(LocalDirAllocator.java:134)
>       at 
> org.apache.hadoop.fs.LocalDirAllocator.getLocalPathForWrite(LocalDirAllocator.java:113)
> {noformat}

--
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