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 ECB7195EB for ; Tue, 20 Mar 2012 20:38:45 +0000 (UTC) Received: (qmail 88160 invoked by uid 500); 20 Mar 2012 20:38:42 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 88073 invoked by uid 500); 20 Mar 2012 20:38:42 -0000 Mailing-List: contact common-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-user@hadoop.apache.org Delivered-To: mailing list common-user@hadoop.apache.org Received: (qmail 88063 invoked by uid 99); 20 Mar 2012 20:38:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Mar 2012 20:38:42 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Patai.Sangbutsarakum@turn.com designates 69.12.158.147 as permitted sender) Received: from [69.12.158.147] (HELO mail02.turn.com) (69.12.158.147) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Mar 2012 20:38:35 +0000 Received: from turn-mail02.turn.corp ([::1]) by turn-mail02.turn.corp ([::1]) with mapi id 14.01.0289.001; Tue, 20 Mar 2012 13:38:13 -0700 From: Patai Sangbutsarakum To: "common-user@hadoop.apache.org" Subject: Re: rack awareness and safemode Thread-Topic: rack awareness and safemode Thread-Index: AQHNBtbn2Irr4j8tf0awSYCnGekA+ZZ0F2cA//+eaYA= Date: Tue, 20 Mar 2012 20:38:12 +0000 Message-ID: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [69.12.158.147] Content-Type: text/plain; charset="us-ascii" Content-ID: <2429AEC774C1374B88404A8AD1425337@turn.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Thanks for your reply and script. Hopefully it still apply to 0.20.203 As far as I play with test cluster. The balancer would take care of replica placement. I just don't want to fall into the situation that the hdfs sit in the safemode for hours and users can't use hadoop and start yelping. Let's hear from others. Thanks=20 Patai On 3/20/12 1:27 PM, "John Meagher" wrote: >ere's the script I used (all sorts of caveats about it assuming a >replication factor of 3 and no real error handling, etc)... > >for f in `hadoop fsck / | grep "Replica placement policy is violated" >| head -n80000 | awk -F: '{print $1}'`; do > hadoop fs -setrep -w 4 $f > hadoop fs -setrep 3 $f >done > >