You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Xintong Song (Jira)" <ji...@apache.org> on 2020/03/12 07:37:00 UTC

[jira] [Created] (FLINK-16563) CommandLineParser should fail with explicit error message when parsing recognized arguments.

Xintong Song created FLINK-16563:
------------------------------------

             Summary: CommandLineParser should fail with explicit error message when parsing 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
             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)