Mahout is just a library that runs on Hadoop, so best practices for writing Hadoop drivers should be applicable: "Implement the Tool interface
If you are writing a Java driver, then consider implementing the Tool<http://hadoop.apache.org/core/docs/current/api/org/apache/hadoop/util/Tool.html> interface to get the following options for free: - -D to pass in arbitrary properties (e.g. -D mapred.reduce.tasks=7 sets the number of reducers to 7) - -files to put files into the distributed cache<http://hadoop.apache.org/core/docs/current/mapred_tutorial.html#DistributedCache> - -archives to put archives (tar, tar.gz, zip, jar) into the distributed cache - -libjars to put JAR files on the task classpath public class MyJob extends Configured implements Tool { public int run(String[] args) throws Exception { JobConf job = new JobConf(getConf(), MyJob.class); // run job ... } public static void main(String[] args) throws Exception { int res = ToolRunner.run(new Configuration(), new MyJob(), args); System.exit(res); } } By taking this step you also make your driver more testable, since you can inject arbitrary configurations using Configured’s setConf() method." from *10 tips for working with Hadoop*<http://www.linkedin.com/e/i5gmb3-gw51xeyp-49/vai/2390941/84244176/member/eml-anet_dig-b_pd-ttl-cn/?hs=false&tok=1oogfeT6cNG501> 2011/12/13 enyun <[email protected]> > Solve this issue by change source code of trunk : add "conf.set(" > mapred.job.queue.name", "xxx"), then it's ok. > but anybody knows the method "how to specify without changing source code?" > > thanks, > > > > > > > At 2011-12-14 03:28:29,"Lance Norskog" <[email protected]> wrote: > >It was about how "-Dproperty=value" arguments are sorted. The issue > >added a change so that these arguments were handled first. > > > >On Tue, Dec 13, 2011 at 2:24 AM, Sean Owen <[email protected]> wrote: > >> What are you referring to here? I don't know of anything that would be > >> relevant. > >> > >> On Tue, Dec 13, 2011 at 3:45 AM, Lance Norskog <[email protected]> > wrote: > >> > >>> There was a bug in Mahout 0.5 which was fixed. Are you using Mahout > >>> 0.5, or trunk? > >>> > >>> > > > > > > > >-- > >Lance Norskog > >[email protected] > -- ksh:
