You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by web service <wb...@gmail.com> on 2011/07/31 03:22:22 UTC

new api, reducer not getting called

Hi,
   I am trying out the new api and it doesn't execute the Reducer.. not sure
why it is so.

code snippet:

[code]
Job job = new Job();
                job.setJarByClass(HdpTest.class);
                FileInputFormat.addInputPath(job, new Path("input"));
                FileOutputFormat.setOutputPath(job, new Path("output"));
                job.setMapperClass(HdpTest.Map.class);
                job.setReducerClass(HdpTest.Reduce.class);
                job.getConfiguration().set("mapred.job.tracker", "local");
                job.waitForCompletion(true);
[/code]

am i missing something ? I am executing it within eclipse.

Re: new api, reducer not getting called

Posted by web service <wb...@gmail.com>.
Thanks for pointing it out.

On Sun, Jul 31, 2011 at 7:53 AM, Harsh J <ha...@cloudera.com> wrote:

> Check if you are running into this simple issue of not having used
> @Override annotations (Iterable vs. Iterator):
>
> http://search-hadoop.com/m/fBRyn1rUldW1
>
> On Sun, Jul 31, 2011 at 6:52 AM, web service <wb...@gmail.com> wrote:
> > Hi,
> >    I am trying out the new api and it doesn't execute the Reducer.. not
> sure
> > why it is so.
> >
> > code snippet:
> >
> > [code]
> > Job job = new Job();
> >                 job.setJarByClass(HdpTest.class);
> >                 FileInputFormat.addInputPath(job, new Path("input"));
> >                 FileOutputFormat.setOutputPath(job, new Path("output"));
> >                 job.setMapperClass(HdpTest.Map.class);
> >                 job.setReducerClass(HdpTest.Reduce.class);
> >                 job.getConfiguration().set("mapred.job.tracker",
> "local");
> >                 job.waitForCompletion(true);
> > [/code]
> >
> > am i missing something ? I am executing it within eclipse.
> >
>
>
>
> --
> Harsh J
>

Re: new api, reducer not getting called

Posted by Harsh J <ha...@cloudera.com>.
Check if you are running into this simple issue of not having used
@Override annotations (Iterable vs. Iterator):

http://search-hadoop.com/m/fBRyn1rUldW1

On Sun, Jul 31, 2011 at 6:52 AM, web service <wb...@gmail.com> wrote:
> Hi,
>    I am trying out the new api and it doesn't execute the Reducer.. not sure
> why it is so.
>
> code snippet:
>
> [code]
> Job job = new Job();
>                 job.setJarByClass(HdpTest.class);
>                 FileInputFormat.addInputPath(job, new Path("input"));
>                 FileOutputFormat.setOutputPath(job, new Path("output"));
>                 job.setMapperClass(HdpTest.Map.class);
>                 job.setReducerClass(HdpTest.Reduce.class);
>                 job.getConfiguration().set("mapred.job.tracker", "local");
>                 job.waitForCompletion(true);
> [/code]
>
> am i missing something ? I am executing it within eclipse.
>



-- 
Harsh J