Return-Path: X-Original-To: apmail-hadoop-common-dev-archive@www.apache.org Delivered-To: apmail-hadoop-common-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A5BA710750 for ; Mon, 23 Dec 2013 04:40:06 +0000 (UTC) Received: (qmail 55207 invoked by uid 500); 23 Dec 2013 04:39:36 -0000 Delivered-To: apmail-hadoop-common-dev-archive@hadoop.apache.org Received: (qmail 55068 invoked by uid 500); 23 Dec 2013 04:39:26 -0000 Mailing-List: contact common-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-dev@hadoop.apache.org Received: (qmail 55057 invoked by uid 99); 23 Dec 2013 04:39:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Dec 2013 04:39:23 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dhaivatpandya@gmail.com designates 74.125.82.43 as permitted sender) Received: from [74.125.82.43] (HELO mail-wg0-f43.google.com) (74.125.82.43) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Dec 2013 04:39:17 +0000 Received: by mail-wg0-f43.google.com with SMTP id k14so4520047wgh.22 for ; Sun, 22 Dec 2013 20:38:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=oWRS/3HKluo13QSB1HpRP7l56uRAndk7r1In1WvELIg=; b=JR1m3cwAgGWALIbmaooN3GZQcVy4oUOszYKuERb7sOE1RaPm8CHRKKQxpEECASII9L l/mx63uvWL8Vec3xGUeI4Y90IETRjmXU94NzRpJjlm8tj+sjX/hS+t+R8zdU9AoC3OlJ aFQWk4NyIUGzYdPv3Y0xa3jNh/QVNsDAV1OV1/lOLfvG6qpqbKoJO0kyZK3TMwZ21wVp u/bgXlR7pHxlqIg0CIjccjf3pgve1aAOn2GpbdSnngkzegkbSpyjsPtTMn4s4XlPSDb3 r3kQDA3Jvd16gUMXC25ljab9W5XD38tzKgD+04BjNh+zppGD/dhynom+iHyiCDAP1Eyy gTIw== X-Received: by 10.194.11.38 with SMTP id n6mr16601965wjb.25.1387773536742; Sun, 22 Dec 2013 20:38:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.235.163 with HTTP; Sun, 22 Dec 2013 20:38:36 -0800 (PST) In-Reply-To: References: From: Dhaivat Pandya Date: Sun, 22 Dec 2013 22:38:36 -0600 Message-ID: Subject: Re: Datanode registration, port number To: common-dev@hadoop.apache.org Content-Type: multipart/alternative; boundary=047d7b5d5710afb28104ee2c34b4 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b5d5710afb28104ee2c34b4 Content-Type: text/plain; charset=ISO-8859-1 I understand that that is how the port is *later* retrieved, but how does the namenode know the port in the first place? i.e. if the datanode sends a packet to the namenode, how does the namenode know what port # the datanode server is running on? On Sun, Dec 22, 2013 at 10:28 PM, Shekhar Sharma wrote: > Check the version file > During the startup Datanode sends out a heart beat signal and NN > assigns a storageID for it which is unique for every datanode. > Using the storage id it identify the ip and port of a datanode > Regards, > Som Shekhar Sharma > +91-8197243810 > > > On Mon, Dec 23, 2013 at 9:41 AM, Dhaivat Pandya > wrote: > > Hi, > > > > I'm currently trying to build a cache layer that should sit "on top" of > the > > datanode. Essentially, the namenode should know the port number of the > > cache layer instead of that of the datanode (since the namenode then > relays > > this information to the default HDFS client). All of the communication > > between the datanode and the namenode currently flows through my cache > > layer (including heartbeats, etc.) > > > > *First question*: is there a way to tell the namenode where a datanode > > should be? Any way to trick it into thinking that the datanode is on a > port > > number where it actually isn't? As far as I can tell, the port number is > > obtained from the DatanodeId object; can this be set in the configuration > > so that the port number derived is that of the cache layer? > > > > I spent quite a bit of time on the above question and I could not find > any > > sort of configuration option that would let me do that. So, I delved into > > the HDFS source code and tracked down the DatanodeRegistration class. > > However, I can't seem to find out *how* the NameNode figures out the > > Datanode's port number or if I could somehow change the packets to > reflect > > the port number of cache layer? *Second question: *how does the namenode > > figure out a newly-registered Datanode's port number? > > > > Thank you, > > > > Dhaivat > --047d7b5d5710afb28104ee2c34b4--