Re: GenericOptionsParser warning
Rasit OZDAS wrote: Hi, There is a JIRA issue about this problem, if I understand it correctly: https://issues.apache.org/jira/browse/HADOOP-3743 Strange, that I searched all source code, but there exists only this control in 2 places: if (!(job.getBoolean("mapred.used.genericoptionsparser", false))) { LOG.warn("Use GenericOptionsParser for parsing the arguments. " + "Applications should implement Tool for the same."); } Just an if block for logging, no extra controls. Am I missing something? If your class implements Tool, than there shouldn't be a warning. OK, for my automated submission code I'll just set that switch and I won't get told off.
Re: GenericOptionsParser warning
You should put this stub code in your program as the means to start your MapReduce job: public class Foo extends Configured implements Tool { public int run(String [] args) throws IOException { JobConf conf = new JobConf(getConf(), Foo.class); // run the job here. return 0; } public static void main(String [] args) throws Exception { int ret = ToolRunner.run(new Foo(), args); // calls your run() method. System.exit(ret); } } On Wed, Feb 18, 2009 at 7:09 AM, Rasit OZDAS wrote: > Hi, > There is a JIRA issue about this problem, if I understand it correctly: > https://issues.apache.org/jira/browse/HADOOP-3743 > > Strange, that I searched all source code, but there exists only this > control > in 2 places: > > if (!(job.getBoolean("mapred.used.genericoptionsparser", false))) { > LOG.warn("Use GenericOptionsParser for parsing the arguments. " + > "Applications should implement Tool for the same."); >} > > Just an if block for logging, no extra controls. > Am I missing something? > > If your class implements Tool, than there shouldn't be a warning. > > Cheers, > Rasit > > 2009/2/18 Steve Loughran > > > Sandhya E wrote: > > > >> Hi All > >> > >> I prepare my JobConf object in a java class, by calling various set > >> apis in JobConf object. When I submit the jobconf object using > >> JobClient.runJob(conf), I'm seeing the warning: > >> "Use GenericOptionsParser for parsing the arguments. Applications > >> should implement Tool for the same". From hadoop sources it looks like > >> setting "mapred.used.genericoptionsparser" will prevent this warning. > >> But if I set this flag to true, will it have some other side effects. > >> > >> Thanks > >> Sandhya > >> > > > > Seen this message too -and it annoys me; not tracked it down > > > > > > -- > M. Raşit ÖZDAŞ >
Re: GenericOptionsParser warning
Hi, There is a JIRA issue about this problem, if I understand it correctly: https://issues.apache.org/jira/browse/HADOOP-3743 Strange, that I searched all source code, but there exists only this control in 2 places: if (!(job.getBoolean("mapred.used.genericoptionsparser", false))) { LOG.warn("Use GenericOptionsParser for parsing the arguments. " + "Applications should implement Tool for the same."); } Just an if block for logging, no extra controls. Am I missing something? If your class implements Tool, than there shouldn't be a warning. Cheers, Rasit 2009/2/18 Steve Loughran > Sandhya E wrote: > >> Hi All >> >> I prepare my JobConf object in a java class, by calling various set >> apis in JobConf object. When I submit the jobconf object using >> JobClient.runJob(conf), I'm seeing the warning: >> "Use GenericOptionsParser for parsing the arguments. Applications >> should implement Tool for the same". From hadoop sources it looks like >> setting "mapred.used.genericoptionsparser" will prevent this warning. >> But if I set this flag to true, will it have some other side effects. >> >> Thanks >> Sandhya >> > > Seen this message too -and it annoys me; not tracked it down > -- M. Raşit ÖZDAŞ
Re: GenericOptionsParser warning
Sandhya E wrote: Hi All I prepare my JobConf object in a java class, by calling various set apis in JobConf object. When I submit the jobconf object using JobClient.runJob(conf), I'm seeing the warning: "Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same". From hadoop sources it looks like setting "mapred.used.genericoptionsparser" will prevent this warning. But if I set this flag to true, will it have some other side effects. Thanks Sandhya Seen this message too -and it annoys me; not tracked it down
GenericOptionsParser warning
Hi All I prepare my JobConf object in a java class, by calling various set apis in JobConf object. When I submit the jobconf object using JobClient.runJob(conf), I'm seeing the warning: "Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same". From hadoop sources it looks like setting "mapred.used.genericoptionsparser" will prevent this warning. But if I set this flag to true, will it have some other side effects. Thanks Sandhya