Return-Path: X-Original-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-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 A7E47F72F for ; Thu, 11 Apr 2013 10:33:54 +0000 (UTC) Received: (qmail 83314 invoked by uid 500); 11 Apr 2013 10:33:50 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 82831 invoked by uid 500); 11 Apr 2013 10:33:49 -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 82799 invoked by uid 99); 11 Apr 2013 10:33:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Apr 2013 10:33:48 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of erlv5241@gmail.com designates 209.85.212.169 as permitted sender) Received: from [209.85.212.169] (HELO mail-wi0-f169.google.com) (209.85.212.169) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Apr 2013 10:33:43 +0000 Received: by mail-wi0-f169.google.com with SMTP id c10so400121wiw.4 for ; Thu, 11 Apr 2013 03:33:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:sender:from:date:x-google-sender-auth :message-id:subject:to:content-type; bh=N6DasYUupE3nG0b7mysZZreoIFGHeCXu9pm7wcLfNEM=; b=yHU+OgifuWIO/SvIFFiQhs3n93lws7L/OOlS3ebeyDbZXIXCtsK/JBi6Gc7lIpJ0NF Ppom3HdN90hL8kzUhN2Y2PcsdHPbe/QWunLRK2eXGd8QcWrteTQ74KXQtqbNjVthg9H6 GqNLWTklDExR1Wkb5D79H0i/r+2IXX/ZDQazsM1879UtOgzat6nx241ZNvHWNzQ7NB53 Ug7jIb6WJDTCAbNYJ0IMsM1yplIGm2X2PASP02OK2Rdh9+ZnXYW+j8qMBXoj3rydKuxI dQvHnOsEQMvlPW8xeMCe78sBrsiRtW2/1q1wbA48v4WylCyL4ZvE/XM0GpY7d0bgel5h pFdA== X-Received: by 10.180.89.243 with SMTP id br19mr32774680wib.5.1365676402520; Thu, 11 Apr 2013 03:33:22 -0700 (PDT) MIME-Version: 1.0 Sender: erlv5241@gmail.com Received: by 10.194.81.230 with HTTP; Thu, 11 Apr 2013 03:33:02 -0700 (PDT) From: Ling Kun Date: Thu, 11 Apr 2013 18:33:02 +0800 X-Google-Sender-Auth: vY9rq2oBIlJep232zh_FRSnHAMk Message-ID: Subject: What is the difference between URI, Home Directory, Working Directory in FileSystem.java or HDFS To: user Content-Type: multipart/alternative; boundary=e89a8f3ba24dd9ba4004da1350d2 X-Virus-Checked: Checked by ClamAV on apache.org --e89a8f3ba24dd9ba4004da1350d2 Content-Type: text/plain; charset=ISO-8859-1 Dear all, I am a little confusing about the URI, Home Directory and Working Directory in the FileSystem.java or HDFS. I have listed my understanding about these concept, can someone please figure out whether I am correct? Thanks. The Home directory: This is usually a directory for a specific Hadoop users. And for the path, it is a user specific path. In HDFS, it is like HDFS://NameNode:port/user/USERNAME. The URI: Is this the root of the distributed filesystem. for HDFS, it is just the HDFS://NameNode:port/ , each file/directory in the distributed filesystem is just a file or subdirectory in this path. The working directory: I am a little confused about this variable. At a given time, there exists only one instance of the filesystem class, and the working dir is a private state of the FS. And during the job running, hadoop will switch among several dirs, and the working dir will be modified once it is switched. Like in the shared system dir, home dir, or input/output dir. Although I have looked through the related document, I am still a little confused about the java.net.URI, java.io.File and org.apache.hadoop.fs.Path class. It seems URI could be hdfs://XXX/XXX/FILENAME, while Path only can be the path without the scheme, hostname and the port. For the File class, it is just an object for a specific file. Thanks yours, Ling Kun -- http://www.lingcc.com --e89a8f3ba24dd9ba4004da1350d2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Dear all,
=A0 =A0I am a little confusing about the=A0U= RI, Home Directory and Working Directory in the FileSystem.java or HDFS.

=A0 I have listed my understanding about these conce= pt, can someone please figure out whether I am correct? =A0Thanks.

=A0 =A0The Home directory: This is usually a directory = for a specific Hadoop users. And for the path, it is a user specific path. = In HDFS, it is like =A0HDFS://NameNode:port/user/USERNAME.

=A0 =A0The URI: Is this the root of the distributed filesystem. for HD= FS, it is just the HDFS://NameNode:port/ , each file/directory in the distr= ibuted filesystem is just a file or subdirectory in this path.
=A0 =A0The working directory: I am a little confused about this = variable. At a given time, there exists only one instance of the filesystem= class, and the working dir is a private state of the FS. And during the jo= b running, hadoop will switch among=A0several dirs, and the working dir wil= l be modified once it is switched. Like in the shared system dir, home dir,= or input/output dir.



=A0 =A0Although I have lo= oked through the related document, I am still a little confused about the j= ava.net.URI, =A0java.io.File and org.apache.hadoop.fs.Path class. It seems = URI could be hdfs://XXX/XXX/FILENAME, while Path only can be the path witho= ut the scheme, hostname and the port. =A0For the File class, it is just an = object for a specific file.



Thanks

yours,
--e89a8f3ba24dd9ba4004da1350d2--