[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[jira] [Created] (FLINK-10496) CommandLineParser arguments interleaving

eugen yushin created FLINK-10496:

             Summary: CommandLineParser arguments interleaving
                 Key: FLINK-10496
                 URL: https://issues.apache.org/jira/browse/FLINK-10496
             Project: Flink
          Issue Type: Improvement
          Components: Configuration, Core, Java API
    Affects Versions: 1.6.1, 1.7.0
            Reporter: eugen yushin
            Assignee: eugen yushin

*Business case:*
Run Flink job cluster within Docker/k8s. Job takes an argument called `--config` which can't be recognized in runtime.

Caused by: java.lang.RuntimeException: No data for required key 'config'

*Problem statement:*
Command line parser can't recognize job specific arguments when they have the same prefix as Flink's ones.


the following args results in failure:
final String arg1 = "--config";
final String arg2 = "/path/to/job.yaml";{code}

Apache CLI parser use string prefix matching to parse options and adds extra --configDir to result set instead of adding new --config.

Update commons-cli dependency with version 1.4 which has flag to disable partial matching.

Update Flink's command line parser to utilize this feature.

This message was sent by Atlassian JIRA