Return-Path: Delivered-To: apmail-hadoop-common-user-archive@www.apache.org Received: (qmail 82558 invoked from network); 17 Dec 2010 22:20:48 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 17 Dec 2010 22:20:48 -0000 Received: (qmail 93548 invoked by uid 500); 17 Dec 2010 22:20:46 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 93513 invoked by uid 500); 17 Dec 2010 22:20:46 -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 93505 invoked by uid 99); 17 Dec 2010 22:20:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Dec 2010 22:20:46 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of maha@umail.ucsb.edu designates 128.111.151.61 as permitted sender) Received: from [128.111.151.61] (HELO outgoing-1.umail.ucsb.edu) (128.111.151.61) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Dec 2010 22:20:38 +0000 Received: from resnet-32-224.resnet.ucsb.edu ([169.231.32.224] helo=[192.168.1.118]) by outgoing-1.umail.ucsb.edu with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.72) (envelope-from ) id 1PTiep-0004yc-QP for common-user@hadoop.apache.org; Fri, 17 Dec 2010 14:20:16 -0800 From: maha Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: multipart/alternative; boundary=Apple-Mail-4-784597940 Subject: Re: Needs a simple answer Date: Fri, 17 Dec 2010 14:20:10 -0800 In-Reply-To: To: common-user@hadoop.apache.org References: <525DA3F7-4ADC-4726-B721-A29623093CC4@umail.ucsb.edu> Message-Id: X-Mailer: Apple Mail (2.1082) X-Virus-Scanned: (umail.ucsb.edu) Clam AV found no viruses in this message X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-4-784597940 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi Ted, thanks for the hint , but I'm using only one machine now .. so = the file is definitely in there.=20 So, How can I open an hdfs- file in my InputFormat class (in GetSplits) = so I can pass the contents to the mappers ? Now, the splits are splits of files-paths from the input directory ( eg. = split1: /tmp/f1, split2:/tmp/f2 .... split4: /tmp/f4) instead I want = -----> ( split1: content of file1 , ....). Thank you, Maha On Dec 16, 2010, at 2:49 PM, Ted Dunning wrote: > Maha, >=20 > Remember that the mapper is not running on the same machine as the = main > class. Thus local files aren't where you think. >=20 > On Thu, Dec 16, 2010 at 1:06 PM, maha wrote: >=20 >> Hi all, >>=20 >> Why the following lines would work in the main class (WordCount) and = not >> in Mapper ? even though " myconf " is set in WordCount to point to = the >> getConf() returned object. >>=20 >> try{ >> FileSystem hdfs =3D = FileSystem.get(wc.WordCount.myconf); >> hdfs.copyFromLocalFile(new Path("/Users/file"), new >> Path("/tmp/file")); >> }catch(Exception e) { System.err.print("\nError");} >>=20 >>=20 >> Also, the print statement will never print on console unless it's in = my >> run function.. >>=20 >> Appreciate it :) >>=20 >> Maha >>=20 >>=20 --Apple-Mail-4-784597940--