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 0392F5380 for ; Tue, 10 May 2011 17:46:59 +0000 (UTC) Received: (qmail 11117 invoked by uid 500); 10 May 2011 17:46:56 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 11056 invoked by uid 500); 10 May 2011 17:46:56 -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 11048 invoked by uid 99); 10 May 2011 17:46:56 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 May 2011 17:46:56 +0000 Received: from localhost (HELO [192.168.11.41]) (127.0.0.1) (smtp-auth username aw, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 May 2011 17:46:56 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1082) Subject: Re: configuration and FileSystem From: Allen Wittenauer In-Reply-To: <745301.91520.qm@web15904.mail.cnb.yahoo.com> Date: Tue, 10 May 2011 10:46:54 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <8AAE62F0-29C9-4BF2-ADC1-BF52F0313568@apache.org> References: <201105101725.20593.pireddu@crs4.it> <201105101747.45198.pireddu@crs4.it> <745301.91520.qm@web15904.mail.cnb.yahoo.com> To: X-Mailer: Apple Mail (2.1082) On May 10, 2011, at 9:57 AM, Gang Luo wrote: > I was confused by the configuration and file system in hadoop. when we = create a=20 > FileSystem object and read/write something through it, are we writing = to or=20 > reading from HDFS? Typically, yes. > Could it be local file system? Yes. > If yes, what determines which=20 > file system it is? Configuration object we used to create the = FileSystem object? Yes. > When I write mapreduce program which "extends Configured implements = Tool", I can=20 > get the right configuration by calling getConf() and use the = FileSystem object=20 > to communicate with HDFS. What if I want to read/write HDFS in a = separate=20 > Utility class? Where does the configuration come from? You need to supply it.