Return-Path: X-Original-To: apmail-hadoop-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-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 A397CE456 for ; Wed, 16 Jan 2013 02:04:11 +0000 (UTC) Received: (qmail 69801 invoked by uid 500); 16 Jan 2013 02:04:06 -0000 Delivered-To: apmail-hadoop-user-archive@hadoop.apache.org Received: (qmail 69713 invoked by uid 500); 16 Jan 2013 02:04:06 -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 69705 invoked by uid 99); 16 Jan 2013 02:04:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Jan 2013 02:04:06 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jamalshasha@gmail.com designates 209.85.216.170 as permitted sender) Received: from [209.85.216.170] (HELO mail-qc0-f170.google.com) (209.85.216.170) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Jan 2013 02:04:01 +0000 Received: by mail-qc0-f170.google.com with SMTP id d42so557181qca.15 for ; Tue, 15 Jan 2013 18:03:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=hddW1aK/T7jgHTd7aQywAPDWThliUe/YZsmtbu+R0rM=; b=SUqyVvX62tkC0Gd6mgqI4ARCk90w39y3YuwdgFm+pqdiXFyLGUj+QVz8bFK9mg73Zl Ba4lu04Tkrpecp8kNrqmwBnyBDR79XAxj/oF2jSAeSqdZ3ygS8BpN7y0PDjF5O3Lir6V 3D4c4/6yKB+fpnqPQ6vvOF2SfrCBJWirSYYT5sIg6zIjffWfwpnevEB1CfAoDcTZcwOw T6qZ5KLgi5BL3B/oKsbyOi6vi7Q7p8aspdMjPQUT3z4tEumqGGPV8k5kizysQygu47a3 uxkFd8v7Cl+hvE8vhCjG6dbvh3kq8uLC5GNjakLxT3tqfxLmwg272OcOk1v0QZqRFiQh LeHw== MIME-Version: 1.0 Received: by 10.224.183.147 with SMTP id cg19mr75271526qab.16.1358301820213; Tue, 15 Jan 2013 18:03:40 -0800 (PST) Received: by 10.229.77.74 with HTTP; Tue, 15 Jan 2013 18:03:40 -0800 (PST) In-Reply-To: References: <543F2659-D007-4242-A6B8-E257D2BFD6BC@nice.com> Date: Tue, 15 Jan 2013 18:03:40 -0800 Message-ID: Subject: Re: newbie question From: jamal sasha To: "user@hadoop.apache.org" Content-Type: multipart/alternative; boundary=20cf303b411d7dda8604d35e49bf X-Virus-Checked: Checked by ClamAV on apache.org --20cf303b411d7dda8604d35e49bf Content-Type: text/plain; charset=ISO-8859-1 Hi, The relevant code snippet posted here http://pastebin.com/DRPXUm62 On Tue, Jan 15, 2013 at 5:31 PM, jamal sasha wrote: > My bad. Sorry I fixed it. It is BuildGraph.class > > > On Tue, Jan 15, 2013 at 5:30 PM, Serge Blazhiyevskyy < > Serge.Blazhiyevskyy@nice.com> wrote: > >> Don't you need to set this >> >> conf.setMapperClass(Mapper.class); >> >> to BuildGraph? >> >> >> Serge >> >> >> SERGE BLAZHIYEVSKY >> Architect >> (T) +1 (650) 226-0511 >> (M) +1 (408) 772-2615 >> serge@nice.com >> www.nice.com >> >> >> On Jan 15, 2013, at 5:24 PM, jamal sasha > jamalshasha@gmail.com>> wrote: >> >> I have a mapper >> >> >> public class BuildGraph{ >> public void config(JobConf job){ <==this block doesnt seems to be >> exexcuting at all :( >> super.configure(job); >> this.currentId = job.getInt("currentId",0); >> if (this.currentId!=0){ >> // I call a method from differnt class to build a distributed >> cache >> } >> } >> public void map(....){ >> .... >> } >> } >> >> now the main code where this is called.. >> >> public void run( String params,curId){ >> JobConf conf = new JobConf(classname.class); >> conf.setInt("currentId",299); <--note this i am setting the value >> here >> conf.setMapperClass(Mapper.class); >> //.... >> JobClient.runJob(conf); >> } >> >> But the problem is config method in the code is not executing as though >> "currentId" returns 299 in main loop but it is not set at all in the mapper >> class. >> what am i doing wrong >> >> > --20cf303b411d7dda8604d35e49bf Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,
=A0The relevant code snippet posted here
http://pastebin.com/DRPXUm62<= br>


On Tue, Jan 15, 2013 at 5:31 PM, jamal sasha <jamalshasha@gmail.com<= /a>> wrote:
My bad. Sorry I fixed it. I= t is BuildGraph.class=A0


On Tue, Jan 15, 2013 at 5:30 PM, Serge B= lazhiyevskyy <Serge.Blazhiyevskyy@nice.com> wrote= :
Don't you need to set this

=A0 =A0 =A0conf.setMapperClass(Mapper.class);

to BuildGraph?


Serge


SERGE BLAZHIYEVSKY
Architect
(T) +1 (650) 226-0511
(M) +1 (408) 772-2615
serge@nice.com<m= ailto:serge@nice.com>
www.nice.com<http://www.nice.com>


On Jan 15, 2013, at 5:24 PM, jamal sasha <jamalshasha@gmail.com<mailto:jamalshasha@gmail.com&= gt;> wrote:

I have a mapper


=A0 =A0 public class BuildGraph{
=A0 =A0 =A0 =A0public void config(JobConf job){ <=3D=3Dthis block doesnt= seems to be exexcuting at all :(
=A0 =A0 =A0 =A0 super.configure(job);
=A0 =A0 =A0 =A0 this.currentId =3D job.getInt("currentId",0);
=A0 =A0 =A0 =A0 if (this.currentId!=3D0){
=A0 =A0 =A0 =A0 // I call a method from differnt class to build a distribut= ed cache
=A0 =A0 =A0 =A0 }
=A0 =A0 =A0 =A0}
=A0 =A0 =A0 public void map(....){
=A0 =A0 ....
=A0 =A0 }
}

now the main code where this is called..

=A0 =A0 public void run( String params,curId){
=A0 =A0 =A0JobConf conf =3D new JobConf(classname.class);
=A0 =A0 =A0conf.setInt("currentId",299); <--note this i am set= ting the value here
=A0 =A0 =A0conf.setMapperClass(Mapper.class);
=A0 =A0 =A0//....
=A0 =A0 =A0 JobClient.runJob(conf);
=A0 =A0 }

But the problem is config method in the code is not executing as though &qu= ot;currentId" returns 299 in main loop but it is not set at all in the= mapper class.
what am i doing wrong



--20cf303b411d7dda8604d35e49bf--