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 1F5E6C70A for ; Thu, 4 Jul 2013 06:18:28 +0000 (UTC) Received: (qmail 64128 invoked by uid 500); 4 Jul 2013 06:18:25 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 64085 invoked by uid 500); 4 Jul 2013 06:18:23 -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 64048 invoked by uid 99); 4 Jul 2013 06:18:21 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jul 2013 06:18:21 +0000 Date: Thu, 4 Jul 2013 06:18:21 +0000 (UTC) From: "Enis Soztutar (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HADOOP-9660) [WINDOWS] Powershell / cmd parses -Dkey=value from command line as [-Dkey, value] which breaks GenericsOptionParser MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-9660?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Enis Soztutar updated HADOOP-9660: ---------------------------------- Attachment: hadoop-9660-branch1_v3-addendum.patch Chris notified me that the commit broke branch-1-win since Guava is not there. I had tested this in a different branch close to branch-1-win (which had guava). Attaching an addendum for branch-1-win which replaces usage of Maps api. > [WINDOWS] Powershell / cmd parses -Dkey=value from command line as [-Dkey, value] which breaks GenericsOptionParser > ------------------------------------------------------------------------------------------------------------------- > > Key: HADOOP-9660 > URL: https://issues.apache.org/jira/browse/HADOOP-9660 > Project: Hadoop Common > Issue Type: Bug > Components: scripts, util > Reporter: Enis Soztutar > Assignee: Enis Soztutar > Fix For: 3.0.0, 1-win, 2.3.0 > > Attachments: hadoop-9660-branch1_v1.patch, hadoop-9660-branch1_v2.patch, hadoop-9660-branch1_v3-addendum.patch, hadoop-9660-branch1_v3.patch, hadoop-9660-branch2_v1.patch, hadoop-9660-branch2_v2.patch, hadoop-9660-branch2_v3.patch > > > When parsing parameters to a class implementing Tool, and using ToolRunner, we can pass > {code} > bin/hadoop -Dkey=value > {code} > However, powershell parses the '=' sign itself, and sends it to java as ["-Dkey", "value"] which breaks GenericOptionsParser. > Using "-Dkey=value" or '-Dkey=value' does not fix the problem. The only workaround seems to trick PS by using: > '"-Dkey=value"' (single + double quote) > In cmd, "-Dkey=value" works, but not '"-Dkey=value"'. > http://stackoverflow.com/questions/4940375/how-do-i-pass-an-equal-sign-when-calling-a-batch-script-in-powershell -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira