[ 
https://issues.apache.org/jira/browse/FLINK-16563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17057673#comment-17057673
 ] 

Zili Chen commented on FLINK-16563:
-----------------------------------

Hi [~xintongsong]

> In CommandLineParser#parse, call DefaultParser#parse with the argument  
> stopAtNonOption set to false.

what if user want to set some arguments for his main? if it is set to false, an 
exception will be thrown at non option so that we don't get user args for his 
main by {{getArgs()}}

See also this mailing thread 
https://lists.apache.org/x/thread.html/ra64b63694e5ceea5b73c136b2b64c9b729ccc85cf8801f54cb2aa916@%3Cuser.flink.apache.org%3E

> CommandLineParser should fail with explicit error message when parsing 
> un-recognized arguments.
> -----------------------------------------------------------------------------------------------
>
>                 Key: FLINK-16563
>                 URL: https://issues.apache.org/jira/browse/FLINK-16563
>             Project: Flink
>          Issue Type: Improvement
>          Components: Runtime / Configuration
>    Affects Versions: 1.10.0
>            Reporter: Xintong Song
>            Priority: Major
>             Fix For: 1.11.0
>
>
> Currently, {{CommandLineParser}} will stop parsing silently if it meets an 
> unrecognized option, leaving the remaining tokens to "args" rather than 
> "options".
> This sometimes lead to problems due to absence of subsequence options, and 
> the error messages do not point to the true root cause. 
> [Example|http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Flink-1-10-container-memory-configuration-with-Mesos-td33594.html]
>  reported in the user ML.
> I've checked and it seems that the "args" generated by {{CommandLineParser}} 
> is not really used anywhere. Therefore, I propose to make the parser fail 
> fast with explicit error message at unrecognized tokens.
> The proposed changes are basically as follows:
>  * In {{CommandLineParser#parse}}, call {{DefaultParser#parse}} with the 
> argument  {{stopAtNonOption}} set to {{false}}.
>  * Remove {{args}} from {{ClusterConfiguration}} and its sub-classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to