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

Steve Loughran commented on HADOOP-4475:
----------------------------------------

Looking at where this method is used, bad binding values could trigger NPEs 
whenever the return value is fed straight into NetUtils.createSocketAddr(), 
which is most places it is used: JobTracker, TaskTracker, SecondaryNameNode, 
FSNameSystem. While an NPE is a valid failure, it would be better for 
diagnoscis for getServerAddress() to detect the null pointer and bail out 
early, including in the exception the name of the attribute that was undefined.

> The (deprecated) method NetUtils.getServerAddress() doesn't validate 
> configuration values enough
> ------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4475
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4475
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: conf
>    Affects Versions: 0.20.0
>            Reporter: Steve Loughran
>            Priority: Minor
>
> Although HADOPP-2827 wants to kill this method, it is handy, but it doesn't 
> have enough address validation, and can return a null value, which triggers 
> NPEs a bit later on in the code

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to