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

zhihai xu commented on HADOOP-12252:
------------------------------------

Thanks [~brahmareddy] for the information, I looked at HADOOP-8437. They looks 
like two different issues.
This NPE happened here is because the newLocalDirs with empty string 
configuration is equals to the initial value savedLocalDirs.
{code}
private String savedLocalDirs = "";
{code}
So {{localDirs}} is not updated. the initial value of {{localDirs}} is null, 
which cause NPE at {{int numDirs = localDirs.length;}}
This NPE issue is caused by NULL initial value of {{localDirs}}.

For HADOOP-8437, the problem is due to failing to create the path or 
DiskErrorException, which cause zero size directory list.

> LocalDirAllocator should not throw NPE with empty string configuration. 
> ------------------------------------------------------------------------
>
>                 Key: HADOOP-12252
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12252
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: zhihai xu
>            Assignee: zhihai xu
>         Attachments: HADOOP-12252.000.patch
>
>
> LocalDirAllocator should not throw NPE with empty string configuration. When 
> an empty string is configured, {{LocalDirAllocator}} will throw NPE. It will 
> be better to throw IOException instead of NPE.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to