Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-16563

CommandLineParser should fail with explicit error message when parsing un-recognized arguments.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 1.10.0
    • 1.11.0
    • None

    Description

      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 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            xtsong Xintong Song
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: