hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kousuke Saruta (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HADOOP-10118) CommandFormat never parse "--"
Date Tue, 19 Nov 2013 22:01:22 GMT
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)

Mime
View raw message