[
https://issues.apache.org/jira/browse/HADOOP-12437?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Arpit Agarwal updated HADOOP-12437:
-----------------------------------
Attachment: HADOOP-12347.04.patch
Thanks for the reviews [~anu] and [~jnp].
v04 patch
- adds two new settings {{hadoop.security.dns.interface}} and
{{hadoop.security.dns.nameserver}}.
- Updates SecurityUtil#getLocalHostName to use these settings.
- reflection-based unit tests for the {{DNS}} class.
While testing we hit the same issue with the YARN NodeManager. Since all
services in a given cluster must use the same DNS settings, it is probably
better to have global settings rather than add more per-service configuration.
bq. consider renaming getIPsAsInetAddresses as something line
getIPsAsInetAddressList
Done
bq. As for testing I was wondering if we might be able to leverage
sun.net.spi.nameservice.NameService and provide our own DNS lookup service
I wasn't sure how to get that working but I was able to use reflection to test
this.
bq. Is it possible to refactor to re-use some of the logic?
Hi [~jnp], that's a good idea. Most of the code is common. Is it okay if I
defer the refactoring as it's messy to separate out? I spent a day refactoring
this class wrt duplication/testability but the patch got quite large and would
need a lot more tests.
> dfs.datanode.dns.interface does not work with hosts file based setups
> ---------------------------------------------------------------------
>
> Key: HADOOP-12437
> URL: https://issues.apache.org/jira/browse/HADOOP-12437
> Project: Hadoop Common
> Issue Type: Bug
> Components: net, security
> Reporter: Arpit Agarwal
> Assignee: Arpit Agarwal
> Attachments: HADOOP-12437.04.patch, HDFS-9109.01.patch,
> HDFS-9109.02.patch, HDFS-9109.03.patch
>
>
> The configuration setting {{dfs.datanode.dns.interface}} lets the DataNode
> select its hostname by doing a reverse lookup of IP addresses on the specific
> network interface. This does not work {{when /etc/hosts}} is used to setup
> alternate hostnames, since {{DNS#reverseDns}} only queries the DNS servers.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)