Return-Path: X-Original-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7B9B536FA for ; Tue, 3 May 2011 01:52:51 +0000 (UTC) Received: (qmail 34527 invoked by uid 500); 3 May 2011 01:52:50 -0000 Delivered-To: apmail-hadoop-hdfs-user-archive@hadoop.apache.org Received: (qmail 34467 invoked by uid 500); 3 May 2011 01:52:50 -0000 Mailing-List: contact hdfs-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-user@hadoop.apache.org Delivered-To: mailing list hdfs-user@hadoop.apache.org Received: (qmail 34459 invoked by uid 99); 3 May 2011 01:52:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 May 2011 01:52:50 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of doducthanhbk@gmail.com designates 209.85.220.176 as permitted sender) Received: from [209.85.220.176] (HELO mail-vx0-f176.google.com) (209.85.220.176) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 May 2011 01:52:46 +0000 Received: by vxa37 with SMTP id 37so7406023vxa.35 for ; Mon, 02 May 2011 18:52:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=PUnOb+hckYe4QkovUw4Z52sUdwJjrhdKFnw3EwJr8po=; b=jbLiHJf3LKr3m6ns1boPrSUa0HqAjDZH7iC4Rm3gyxQu7tw8PuRI7fGCC57cN3vgLe 6ou+E9MgSQmxtaLYs6JxYfr/o5z261tbcp8i5w74L/leTV4L3uiDQ+zKAA8QyITZkPiG 9SX6udNVF+mD0HXbibaYwPdjLHhecujy8QVUI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=ghvjg9UBTGe7bmo292Ze996tvyGW20F/8Pj8xObc+ZlvKuY8Dm9fTj9UiKJGPjf5A2 5e9+bB1b/Ea9TNV/i9OiCIvAKVOlyzZ1imXaXKDNNlVAobQqnsO7Yy95Y3lBZ+L+OjHH Cqm26rpnNpUClND9hDg0t6G5UESLsp9Dq0O3Y= MIME-Version: 1.0 Received: by 10.52.184.202 with SMTP id ew10mr826013vdc.188.1304387544961; Mon, 02 May 2011 18:52:24 -0700 (PDT) Sender: doducthanhbk@gmail.com Received: by 10.52.157.3 with HTTP; Mon, 2 May 2011 18:52:24 -0700 (PDT) In-Reply-To: References: Date: Mon, 2 May 2011 20:52:24 -0500 X-Google-Sender-Auth: GYNou5VDFxFDsD5ZO_izFtSf0Wc Message-ID: Subject: Re: fsimage save file From: Thanh Do To: hdfs-user@hadoop.apache.org Content-Type: multipart/alternative; boundary=bcaec54865404451c004a2556473 --bcaec54865404451c004a2556473 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable thanks for confirmation. On Mon, May 2, 2011 at 8:48 PM, Todd Lipcon wrote: > On Mon, May 2, 2011 at 6:39 PM, Thanh Do wrote: > >> So the order of saving is based on how child list >> is organized. According from the code from >> INodeDirectory.addChild(), every time we add a child, >> we do a binary search to find the appropriate insert location. >> >> So I think the child list is sorted on alphabetical order. >> Am I right? >> > > Yes, I would agree with that. Though "UTF8 bytewise lexicographic order" = is > probably more correct. For example, accent characters won't be > alphabetically sorted: > > [todd@monster01 ~]$ hadoop fs -ls > Found 5 items > drwxr-xr-x - todd supergroup 0 2011-05-02 18:47 /user/todd/=C3= =A2pple > drwxr-xr-x - todd supergroup 0 2011-05-02 18:48 /user/todd/=C3= =A8vil > drwx------ - todd supergroup 0 2011-04-06 14:25 > /user/todd/.staging > drwxr-xr-x - todd supergroup 0 2011-05-02 18:47 /user/todd/app= le > drwxr-xr-x - todd supergroup 0 2011-05-02 18:47 /user/todd/zeb= ra > > > -Todd > > >> >> Thanh >> >> >> On Mon, May 2, 2011 at 3:51 PM, Todd Lipcon wrote: >> >>> On Mon, May 2, 2011 at 1:20 PM, Thanh Do wrote: >>> >>>> hi all, >>>> >>>> perhaps this is a dummy question but >>>> can anyone tell me that when >>>> the namenode saves a fsimage, >>>> are the Inodes saved in an alphabetical order? >>>> >>> >>> Hi Thanh, >>> >>> They're saved in directory traversal order (can't remember if it's >>> breadth first or depth first, but the code should tell you) >>> >>> -Todd >>> -- >>> Todd Lipcon >>> Software Engineer, Cloudera >>> >> >> > > > -- > Todd Lipcon > Software Engineer, Cloudera > --bcaec54865404451c004a2556473 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
thanks for confirmation.

On Mon, May = 2, 2011 at 8:48 PM, Todd Lipcon <todd@cloudera.com> wrote:
On Mon, May 2, 2011 at 6:39 PM, Thanh Do <thanhdo@cs.w= isc.edu> wrote:
So the order of saving is based on how child list
is organized. Accordin= g from the code from
INodeDirectory.addChild(), every time we add a chi= ld,
we do a binary search to find the appropriate insert location.

So I think the child list is sorted on alphabetical order.
Am I righ= t?

Yes, I would agree with that. = Though "UTF8 bytewise lexicographic order" is probably more corre= ct. For example, accent characters won't be alphabetically sorted:

[todd@monster01 ~]$ hadoop fs -ls
Found = 5 items
drwxr-xr-x =C2=A0 - todd supergroup =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A00 2011-05-02 18:47 /user/todd/=C3=A2pple
drwxr-xr-x = =C2=A0 - todd supergroup =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00 2011-05-02 18:= 48 /user/todd/=C3=A8vil
drwx------ =C2=A0 - todd supergroup =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= 0 2011-04-06 14:25 /user/todd/.staging
drwxr-xr-x =C2=A0 - todd s= upergroup =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00 2011-05-02 18:47 /user/todd/a= pple
drwxr-xr-x =C2=A0 - todd supergroup =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A00 2011-05-02 18:47 /user/todd/zebra


-Todd
=C2=A0

Thanh


On Mon, May 2, 2011 at 3:51 PM, Tod= d Lipcon <todd@cloudera.com> wrote:
On Mon, May 2, 20= 11 at 1:20 PM, Thanh Do <thanhdo@cs.wisc.edu> wrote:
hi all,

perhaps this is a dummy question but
can anyone tell me t= hat when
the namenode saves a fsimage,
are the Inodes saved in an al= phabetical order?

Hi Thanh,

They're saved in directory traversal order (can't re= member if it's breadth first or depth first, but the code should tell y= ou)

-Todd
--
Todd Lipcon
Software Engineer, Cloudera


=

--
Todd Lipcon
Software Engineer, Cloudera

--bcaec54865404451c004a2556473--