Return-Path: Delivered-To: apmail-hadoop-common-user-archive@www.apache.org Received: (qmail 67093 invoked from network); 16 Dec 2010 22:49:54 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 16 Dec 2010 22:49:54 -0000 Received: (qmail 43652 invoked by uid 500); 16 Dec 2010 22:49:52 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 43607 invoked by uid 500); 16 Dec 2010 22:49:52 -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 43599 invoked by uid 99); 16 Dec 2010 22:49:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Dec 2010 22:49:52 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.216.48] (HELO mail-qw0-f48.google.com) (209.85.216.48) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Dec 2010 22:49:46 +0000 Received: by qwh6 with SMTP id 6so68157qwh.35 for ; Thu, 16 Dec 2010 14:49:24 -0800 (PST) Received: by 10.224.214.71 with SMTP id gz7mr24921qab.349.1292539764717; Thu, 16 Dec 2010 14:49:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.220.190.75 with HTTP; Thu, 16 Dec 2010 14:49:04 -0800 (PST) X-Originating-IP: [64.105.168.204] In-Reply-To: <525DA3F7-4ADC-4726-B721-A29623093CC4@umail.ucsb.edu> References: <525DA3F7-4ADC-4726-B721-A29623093CC4@umail.ucsb.edu> From: Ted Dunning Date: Thu, 16 Dec 2010 14:49:04 -0800 Message-ID: Subject: Re: Needs a simple answer To: common-user@hadoop.apache.org Content-Type: multipart/alternative; boundary=20cf30050ec088b94904978eddd5 --20cf30050ec088b94904978eddd5 Content-Type: text/plain; charset=ISO-8859-1 Maha, Remember that the mapper is not running on the same machine as the main class. Thus local files aren't where you think. On Thu, Dec 16, 2010 at 1:06 PM, maha wrote: > Hi all, > > 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. > > try{ > FileSystem hdfs = FileSystem.get(wc.WordCount.myconf); > hdfs.copyFromLocalFile(new Path("/Users/file"), new > Path("/tmp/file")); > }catch(Exception e) { System.err.print("\nError");} > > > Also, the print statement will never print on console unless it's in my > run function.. > > Appreciate it :) > > Maha > > --20cf30050ec088b94904978eddd5--