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

Ewan Higgs commented on HDFS-13795:
-----------------------------------

{quote}Shouldn't the approach be to make sure aliasMap always exists by 
checking the configuration and refusing to start unless the configuration is 
valid?{quote}

I think there should not be a null check inside the AliasMap. By returning 
{{Option.empty()}} we give the impression that there is no data in the AliasMap 
when there may be - we're not misconfigured.

The issue here is that the NN should detect the misconfinguration and fail in a 
nicer way than NPE here.

> Fix potential NPE in InMemoryLevelDBAliasMapServer
> --------------------------------------------------
>
>                 Key: HDFS-13795
>                 URL: https://issues.apache.org/jira/browse/HDFS-13795
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Virajith Jalaparti
>            Assignee: Virajith Jalaparti
>            Priority: Major
>         Attachments: HDFS-13795.001.patch, HDFS-13795.002.patch, 
> HDFS-13795.003.patch, HDFS-13795.004.patch
>
>
> Namenode fails to stop correctly due to NPE in InMemoryAliasMapServer, when 
> it is configured incorrectly.
> {code:java}
>     java.lang.NullPointerException
>                 at 
> org.apache.hadoop.hdfs.server.aliasmap.InMemoryLevelDBAliasMapServer.close(InMemoryLevelDBAliasMapServer.java:149)
>                 at 
> org.apache.hadoop.hdfs.server.namenode.NameNode.stop(NameNode.java:1023)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to