Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A74019A0C for ; Tue, 8 May 2012 05:09:05 +0000 (UTC) Received: (qmail 15455 invoked by uid 500); 8 May 2012 05:09:05 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 15403 invoked by uid 500); 8 May 2012 05:09:04 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 15379 invoked by uid 99); 8 May 2012 05:09:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 May 2012 05:09:04 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 May 2012 05:09:01 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 77F31439068 for ; Tue, 8 May 2012 05:08:40 +0000 (UTC) Date: Tue, 8 May 2012 05:08:40 +0000 (UTC) From: "Eli Collins (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <498326692.37553.1336453720493.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <834825568.1315.1333213227456.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HDFS-3171) The DatanodeID "name" field is overloaded MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-3171?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D13270= 206#comment-13270206 ]=20 Eli Collins commented on HDFS-3171: ----------------------------------- They're dupes of each other, I posted a patch to HDFS-3328. =20 > The DatanodeID "name" field is overloaded=20 > ------------------------------------------ > > Key: HDFS-3171 > URL: https://issues.apache.org/jira/browse/HDFS-3171 > Project: Hadoop HDFS > Issue Type: Improvement > Components: data-node > Reporter: Eli Collins > Assignee: Eli Collins > Fix For: 2.0.0 > > Attachments: hdfs-3171.txt > > > The DatanodeID "name" field is currently overloaded, when the DN creates = a DatanodeID to register with the NN it sets "name" to be the datanode host= name, which is the DN's "hostName" member. This isnot necesarily a FQDN, it= is either set explicitly or determined by the DNS class, which could retur= n the machine's hostname or the result of a DNS lookup, if configured to do= so. The NN then clobbers the "name" field of the DatanodeID with the IP pa= rt of the new DatanodeID "name" field it creates (and sets the DatanodeID "= hostName" field to the reported "name"). The DN gets the DatanodeID back fr= om the NN and clobbers its "hostName" member with the "name" field of the r= eturned DatanodeID. This makes the code hard to reason about eg DN#getMachi= ne name sometimes returns a hostname and sometimes not, depending on when i= t's called in sequence with the registration. Ditto for uses of the "name" = field. I think these contortions were originally performed because the Data= nodeID didn't have a hostName field (it was part of DatanodeInfo) and so th= ere was no way to communicate both at the same time. Now that the hostName = field is in DatanodeID (as of HDFS-3164) we can establish the invariant tha= t the "name" field always and only has an IP address and the "hostName" fie= ld always and only has a hostname. > In HDFS-3144 I'm going to rename the "name" field so its clear that it co= ntains an IP address. The above is enough scope for one change. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira