hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HADOOP-4475) The (deprecated) method NetUtils.getServerAddress() doesn't validate configuration values enough
Date Thu, 22 Jan 2009 16:05:59 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-4475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Steve Loughran updated HADOOP-4475:

    Attachment: hadoop-4475.patch

This patch detects null address values early, and fails with a meaningful error, rather than
an NPE, whenever there is no value for the newBindAddressName defined in the configuration.
Currently a NPE is triggered either in {{NetUtils.getServerAddress()}}, or in the code to
create an InetAddress which invariably follows it.

It includes tests that verify that
* attempts to retrieve an undefined value fail
* you cannot use the oldBindAddress/oldBindPort values unless the newBindAddressName value
is set in the configuration
* A non-tuple "hostname" is valid as the newBindAddressName, it is up to {{NetUtils.createSocketAddr()}}
to do the final parsing and validaton
* invalid triples "host:port:port" get picked up later in {{NetUtils.createSocketAddr()}}

* invalid port numbers "host:twelve" are picked up in {{NetUtils.createSocketAddr()}} 
* negative port numbers "host:-23" are picked up in {{NetUtils.createSocketAddr()}} 
These are all the existing semantics of the method, now with tests to catch regressions. 

> The (deprecated) method NetUtils.getServerAddress() doesn't validate configuration values
> ------------------------------------------------------------------------------------------------
>                 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
>         Attachments: hadoop-4475.patch
> 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

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

View raw message