we prefer the <java> action because then our api is consistent whether we run with oozie, or using "hadoop jar".
One thing to be cautious of is that you'll end up with a single-task launcher running on your cluster using this method (it's running the main-class), so make sure you turn off pre-emption in your scheduler if you have it enabled to stop multiple versions being submitted because that one task will last as long as the entire mapreduce takes to run and so will be prime pickings for the scheduler. On Mon, Jan 7, 2013 at 12:42 PM, Robert Kanter <[email protected]> wrote: > Hi Dave, > > Its simplest to use the <mapreduce> action and not your own main class; > that said, you can also use the <java> action to specify your main class, > which can then run the mapper/reducer (that's essentially what the > <mapreduce> action does internally). > > - Robert > > > > On Mon, Jan 7, 2013 at 5:32 AM, Dave Cardwell <[email protected] > >wrote: > > > Hi there, > > > > I have a MapReduce job using the old API, in which I have a “job setup” > > class that extends Configured and implements Tool, and in its run method > > sets the mapper, reducer, and a custom partitioner, key comparator, and > > value grouping comparator. > > > > I want to run this MapReduce job as part of an Oozie workflow, but all of > > the <map-reduce> examples I can find seem to set mapred.mapper.class and > > mapred.reducer.class in the <configuration/>, rather than just > specifying a > > main class to run that does all this. > > > > Is there some configuration option I’m missing, or should I be using a > > <java> action for this, or am I going about this the wrong way and should > > be setting my input and output formats, and my mapper, > > reducer, partitioner, etc. classes in the Oozie workflow.xml and skipping > > this main class? > > > > -- > > Best wishes, > > Dave Cardwell. > > > > http://davecardwell.co.uk/ > > > -- Matthew Rathbone Foursquare | Software Engineer | Server Engineering Team [email protected] | @rathboma <http://twitter.com/rathboma> | 4sq<http://foursquare.com/rathboma>
