Return-Path: Delivered-To: apmail-hadoop-core-user-archive@www.apache.org Received: (qmail 32647 invoked from network); 18 Feb 2009 20:25:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Feb 2009 20:25:28 -0000 Received: (qmail 47966 invoked by uid 500); 18 Feb 2009 20:25:21 -0000 Delivered-To: apmail-hadoop-core-user-archive@hadoop.apache.org Received: (qmail 47927 invoked by uid 500); 18 Feb 2009 20:25:21 -0000 Mailing-List: contact core-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-user@hadoop.apache.org Delivered-To: mailing list core-user@hadoop.apache.org Received: (qmail 47916 invoked by uid 99); 18 Feb 2009 20:25:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Feb 2009 12:25:21 -0800 X-ASF-Spam-Status: No, hits=3.4 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.128.187] (HELO fk-out-0910.google.com) (209.85.128.187) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Feb 2009 20:25:13 +0000 Received: by fk-out-0910.google.com with SMTP id 19so65893fkr.13 for ; Wed, 18 Feb 2009 12:24:52 -0800 (PST) MIME-Version: 1.0 Received: by 10.181.199.6 with SMTP id b6mr848785bkq.137.1234988691486; Wed, 18 Feb 2009 12:24:51 -0800 (PST) In-Reply-To: References: <7e71ebe90902180148n5c85e8e3sc3b7752fec451947@mail.gmail.com> <499C1659.9010304@apache.org> Date: Wed, 18 Feb 2009 12:24:51 -0800 Message-ID: Subject: Re: GenericOptionsParser warning From: Aaron Kimball To: core-user@hadoop.apache.org Content-Type: multipart/alternative; boundary=001636c5a26741f823046337366f X-Virus-Checked: Checked by ClamAV on apache.org --001636c5a26741f823046337366f Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable 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 =3D new JobConf(getConf(), Foo.class); // run the job here. return 0; } public static void main(String [] args) throws Exception { int ret =3D 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=BAit =D6ZDA=AA > --001636c5a26741f823046337366f--