Return-Path: X-Original-To: apmail-hadoop-common-user-archive@www.apache.org Delivered-To: apmail-hadoop-common-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 15C9FD5C4 for ; Thu, 13 Sep 2012 03:33:43 +0000 (UTC) Received: (qmail 50423 invoked by uid 500); 13 Sep 2012 03:33:38 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 50307 invoked by uid 500); 13 Sep 2012 03:33:38 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 50295 invoked by uid 99); 13 Sep 2012 03:33:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Sep 2012 03:33:38 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of harsh@cloudera.com designates 209.85.214.176 as permitted sender) Received: from [209.85.214.176] (HELO mail-ob0-f176.google.com) (209.85.214.176) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Sep 2012 03:33:32 +0000 Received: by obbtb18 with SMTP id tb18so4919157obb.35 for ; Wed, 12 Sep 2012 20:33:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding:x-gm-message-state; bh=++RCF+7VOcgBakDUt/6FuWEfdajSxYxCN+CkLNjsuiM=; b=nCCgq/Sxz+ZDeMyAD4FF99To32fn5Nx27mweeef/uk66Txfg53pZUJM+jUL+dJ7BQQ nixqzvoO9voi0vjJQu1OFKG8S7yBqo0JLeOCcRIEkAqOTag5YhFG+V+1XE8kNtGMB/8N u6TOUmgO3lEk5i6yyPMd9uUbuRAF5mUXkvEYOZelLXEbyKGRjTOiuCKWhR6/L4ditC+a 2skK/0F6mjZlw9JxkrwDWbfAW6BBrGDOp9dZ4YyTu4zvmiIiLExqUfrsGRjHMq7M4fUB ar4227eJubLWoDzfctrJerMpxmjkTlwOy4f1TKUK/448hzcoIecFqcFefAKmlLd1kbib 0Vhw== Received: by 10.60.26.133 with SMTP id l5mr485944oeg.60.1347507192156; Wed, 12 Sep 2012 20:33:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.11.168 with HTTP; Wed, 12 Sep 2012 20:32:52 -0700 (PDT) In-Reply-To: References: From: Harsh J Date: Thu, 13 Sep 2012 09:02:52 +0530 Message-ID: Subject: Re: rack topology data update To: user@hadoop.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQkddNkARC4loAPjGq2XhWmGq+tZAaC+ojDss1P0O8//0S8yYv33LwSzviC0eKULZfM3v2Ol X-Virus-Checked: Checked by ClamAV on apache.org Jameson, The right process to add a new node with the right mapping is: 1. Update topology file for the new DN. 2. Issue a dfsadmin -refreshNodes to get new topology mapping updated in NN= . 3. Start the DN only after (2) so it picks up the right mapping and a default mapping does not get cached. On Thu, Sep 13, 2012 at 8:33 AM, Jameson Li wrote: > Our hadoop version is hadoop-0.20-append+4. > > We have configured the rack awareness in the namenode. > But when I add new datanode, and update the topology data file, and resta= rt > the datanode, I just see the log in the namenode that: > 2012-09-13 10:35:25,074 INFO org.apache.hadoop.net.NetworkTopology: Addin= g a > new node: /default-rack/ipc:50010 > So should I restart the namenode? > Is there some command like 'hadoop dfsadmin -refreshtopology'? > > My configuration: > > core-site.xml: > > topology.script.file.name > conf/rack-awareness.sh > > > topology.script.number.args > 1000 > > > conf/rack-awareness.sh: > #!/bin/sh > > HADOOP_CONF=3D/opt/hadoop/conf > > while [ $# -gt 0 ] ; do > nodeArg=3D$1 > exec< ${HADOOP_CONF}/topology.data > result=3D"" > while read line ; do > ar=3D( $line ) > if [ "${ar[0]}" =3D "$nodeArg" ] ; then > result=3D"${ar[1]}" > fi > done > shift > if [ -z "$result" ] ; then > echo -n "/default-rack " > else > echo -n "$result " > fi > done > > topology.data=EF=BC=9A > ipa rackA > ipb rackA > ipc rackB > > > And also I have search the mailing list "topology.script.file update": > I found a mail that: > Tom Hall 2011-10-27, 16:07 > I was hoping that if I updated the file it would give new answers as > datanodes were restarted and reconnected but that does not seem to be > the case. > Surely I dont need to restart the namenode... > > But there is not replying. > So somebody can help me? > > > =E4=B8=93=E6=B3=A8=E4=BA=8EMysql,MSSQL,Oracle,Hadoop --=20 Harsh J