hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jagane Sundar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-4269) DatanodeManager#registerDatanode rejects all datanode registrations from localhost in single-node developer setup
Date Mon, 22 Apr 2013 23:21:17 GMT

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

Jagane Sundar commented on HDFS-4269:
-------------------------------------

OK. The TCP endpoint gives you an IP address, not a hostname. It seems like there are two
places in the NameNode where you might want to convert these IP addresses to hostnames:

1. If the hosts allow and deny files have hostnames, then the NameNode must do a reverse DNS
lookup of the IP address and ensure that the hostname that the reverse DNS lookup returns
is not in the deny file.

2. In the web UI, the NameNode may want to display a human friendly name, instead of an IP
address. (Even this could be an error, because the browser could resolve the hostname to an
IP address that the DataNode is not listening on)

My belief is that the NameNode should operate exclusively using IP addresses. Only in the
above two places should there be any DNS reverse lookups.

Would it not be better to move 'does reverse lookup succeed' check to the inExcludedHostsList
method in DatanodeManager.java? This way we will be saying:
'We need to exclude host X, and we could not reverse lookup your IP, so we do not know whether
you are in the excluded list or not. Sorry. We cannot allow a connection from you.'

The check is now in registerDatanode. What we are saying is:
'We are unable to do a reverse lookup on your IP address. So we cannot allow any connections
from you'

The problem is over by the east, and we blew out a big giant hole of functionality in the
west. And nobody will understand why we have this mysterious hole in the west....

Is this an example of code refuctoring?
http://www.waterfall2006.com/Refuctoring.pdf
                
> DatanodeManager#registerDatanode rejects all datanode registrations from localhost in
single-node developer setup
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-4269
>                 URL: https://issues.apache.org/jira/browse/HDFS-4269
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>    Affects Versions: 3.0.0, trunk-win, 2.0.5-beta
>            Reporter: Chris Nauroth
>            Assignee: Chris Nauroth
>             Fix For: 3.0.0
>
>         Attachments: HDFS-4269.1.patch, HDFS-4269.2.patch, HDFS-4269.3.patch
>
>
> HDFS-3990 is a change that optimized some redundant DNS lookups.  As part of that change,
{{DatanodeManager#registerDatanode}} now rejects attempts to register a datanode for which
the name has not been resolved.  Unfortunately, this broke single-node developer setups on
Windows, because Windows does not resolve 127.0.0.1 to "localhost".

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message