Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 98AC99551 for ; Fri, 17 Feb 2012 22:07:22 +0000 (UTC) Received: (qmail 71613 invoked by uid 500); 17 Feb 2012 22:07:22 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 71569 invoked by uid 500); 17 Feb 2012 22:07:22 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 71561 invoked by uid 99); 17 Feb 2012 22:07:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Feb 2012 22:07:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Feb 2012 22:07:19 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 5D3231BD5AF for ; Fri, 17 Feb 2012 22:06:58 +0000 (UTC) Date: Fri, 17 Feb 2012 22:06:58 +0000 (UTC) From: "John George (Resolved) (JIRA)" To: common-issues@hadoop.apache.org Message-ID: <1295332781.52326.1329516418383.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (HADOOP-5404) GenericOptionsParser should parse generic options even if they appear after Tool-specific options MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-5404?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] John George resolved HADOOP-5404. --------------------------------- Resolution: Duplicate Marking this as a dupe of HADOOP-7995 > GenericOptionsParser should parse generic options even if they appear after Tool-specific options > ------------------------------------------------------------------------------------------------- > > Key: HADOOP-5404 > URL: https://issues.apache.org/jira/browse/HADOOP-5404 > Project: Hadoop Common > Issue Type: Improvement > Components: util > Affects Versions: 0.19.1 > Environment: All > Reporter: Milind Bhandarkar > Labels: newbie > > Currently, when GenericOptionsParser encounters an unrecognized option, it stops processing command-line arguments, and returns the rest to the specific Tool. This forces users to remember the order of arguments, and leads to errors such as following: > org.apache.commons.cli.UnrecognizedOptionException: Unrecognized option: > -Dmapred.reduce.tasks=4 > at org.apache.commons.cli.Parser.processOption(Parser.java:368) > at org.apache.commons.cli.Parser.parse(Parser.java:185) > at org.apache.commons.cli.Parser.parse(Parser.java:70) > at > MyTool.run(MyTool.java.java:290) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65) > at > MyTool.main(MyTool.java:19) > In Hadoop-streaming as well, -D parameters should appear before streaming-specific arguments, such as -mapper, -reducer etc. > If GenericOptionsParser were to scan the entire command-line, ignoring unrecognized (tool-specific) options, and returning all unrecognized options back to the tool, this problem would be solved. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira