[ https://issues.apache.org/jira/browse/FLINK-1424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14291265#comment-14291265 ]
Max Michels edited comment on FLINK-1424 at 1/25/15 8:52 PM: ------------------------------------------------------------- [~cebe] The commit you mention makes it possible to have - or -- prefixed arguments for the jobs. As of this change, everything behind the job jar file is treated as arguments for the jar. {{./flink run -c classpath job.jar}} sets the class of the job.jar to start execution. {{./flink run job.jar -c classpath}} sets the arguments for job.jar to "-c" and "classpath" Currently, the parser stops if it finds a non-option (argument not prefixed with - or --) after "run". That way, you cannot accidentally set options of the flink command line tool with your job's arguments. In the above example, if the two commands were identical and if your program had the argument -c, you would also change the -c option of the flink command line tool which would overwrite your job's class entry point and lead to a failed submission of the job. Thus, I suggest to adapt the help notice to make it clear where the flink command line tool options should go. was (Author: mxm): [~cebe] The commit you mention makes it possible to have - or -- prefixed arguments for the jobs. As of this change, everything behind the job jar file is treated as arguments for the jar. {{./flink run -c classpath job.jar}} sets the class of the job.jar to start execution. {{./flink run job.jar -c classpath}} sets the arguments for job.jar to "-c" and "classpath" Currently, the parser stops if it finds a non-option (argument not prefixed with - or --) after "run". That way, you cannot accidentally set options of the flink command line tool with your job's arguments. Imagine, your program had the argument -m. If the above two examples were equivalent, you would also change the -m flag of the flink command line tool which would overwrite the job manager url and lead to a failed submission of the job. Thus, I suggest to adapt the help notice to make it clear where the flink command line tool options should go. > bin/flink run does not recognize -c parameter anymore > ----------------------------------------------------- > > Key: FLINK-1424 > URL: https://issues.apache.org/jira/browse/FLINK-1424 > Project: Flink > Issue Type: Bug > Components: TaskManager > Affects Versions: master > Reporter: Carsten Brandt > > bin/flink binary does not recognize `-c` parameter anymore which specifies > the class to run: > {noformat} > $ ./flink run "/path/to/target/impro3-ws14-flink-1.0-SNAPSHOT.jar" -c > de.tu_berlin.impro3.flink.etl.FollowerGraphGenerator /tmp/flink/testgraph.txt > 10000 > usage: emma-experiments-impro3-ss14-flink > [-?] > emma-experiments-impro3-ss14-flink: error: unrecognized arguments: '-c' > {noformat} > before this command worked fine and executed the job. > I tracked it down to the following commit using `git bisect`: > {noformat} > 93eadca782ee8c77f89609f6d924d73021dcdda9 is the first bad commit > commit 93eadca782ee8c77f89609f6d924d73021dcdda9 > Author: Alexander Alexandrov <alexander.s.alexand...@gmail.com> > Date: Wed Dec 24 13:49:56 2014 +0200 > [FLINK-1027] [cli] Added support for '--' and '-' prefixed tokens in CLI > program arguments. > > This closes #278 > :040000 040000 a1358e6f7fe308b4d51a47069f190a29f87fdeda > d6f11bbc9444227d5c6297ec908e44b9644289a9 M flink-clients > {noformat} > https://github.com/apache/flink/commit/93eadca782ee8c77f89609f6d924d73021dcdda9 -- This message was sent by Atlassian JIRA (v6.3.4#6332)