hadoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamal sasha <jamalsha...@gmail.com>
Subject Re: newbie question
Date Wed, 16 Jan 2013 01:31:59 GMT
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<mailto: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>> 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
>
>

Mime
View raw message