You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Kousuke Saruta (JIRA)" <ji...@apache.org> on 2013/11/19 23:01:22 UTC

[jira] [Created] (HADOOP-10118) CommandFormat never parse "--"

Kousuke Saruta created HADOOP-10118:
---------------------------------------

             Summary: CommandFormat never parse "--"
                 Key: HADOOP-10118
                 URL: https://issues.apache.org/jira/browse/HADOOP-10118
             Project: Hadoop Common
          Issue Type: Bug
          Components: fs
    Affects Versions: 3.0.0
            Reporter: Kousuke Saruta


We cannot use "--" option to skip args following that.
CommandFormat#parse is implemented as follows.

{code}
public void parse(List<String> args) {
...
      } else if (arg.equals("--")) { // force end of option processing
        args.remove(pos);
        break;
      }
...
{code}

But, FsShell is called through ToolRunner and ToolRunner use GenericOptionParser. GenericOptionParser use GnuParser, which discard "--" when parsing args.



--
This message was sent by Atlassian JIRA
(v6.1#6144)