You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Robert Metzger (Jira)" <ji...@apache.org> on 2020/10/05 06:16:00 UTC

[jira] [Updated] (FLINK-19493) In CliFrontend, make flow of Configuration more obvious

     [ https://issues.apache.org/jira/browse/FLINK-19493?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Metzger updated FLINK-19493:
-----------------------------------
    Component/s: Command Line Client

> In CliFrontend, make flow of Configuration more obvious
> -------------------------------------------------------
>
>                 Key: FLINK-19493
>                 URL: https://issues.apache.org/jira/browse/FLINK-19493
>             Project: Flink
>          Issue Type: Improvement
>          Components: Command Line Client
>            Reporter: Aljoscha Krettek
>            Assignee: Aljoscha Krettek
>            Priority: Major
>
> It's very important to ensure that the {{Configuration}} the {{CliFrontend}} loads ends up in the {{*ContexteEnvironment}} and that its settings are reflected there. Currently, there are no tests for this behaviour and it is hard to convince yourself that the code is actually doing the right thing. We should simplify the flow of the {{Configuration}} from loading to the environment and add tests that verify this behaviour.
> Currently, the flow is roughly this:
>  - the {{main()}} method loads the {{Configuration}} (from {{flink-conf.yaml}})
>  - the {{Configuration}} is passed to the {{CustomCommandLines}} in {{loadCustomCommandLines()}}
>  - {{main()}} passes both the {{Configuration}} and the {{CustomCommandLines}} to the constructor of {{CliFrontend}}
>  - when we need a {{Configuration}} for execution {{getEffectiveConfiguration()}} is called. This doesn't take the {{Configuration}} of the {{CliFrontend}} as a basis but instead calls {{CustomCommandLine.applyCommandLineOptionsToConfiguration}}
> It's up to the {{CustomCommandLine.applyCommandLineOptionsToConfiguration()}} implemenation to either forward the {{Configuration}} that was given to it by the {{CliFrontend.main()}} method or return some other {{Configuration}}. Only if the correct {{Configuration}} is returned can we ensure that user settings make it all the way though.
> I'm proposing to change {{CustomCommandLine.applyCommandLineOptionsToConfiguration()}} to instead apply it's settings to a {{Configuration}} that is passed in a parameter, then {{getEffectiveConfiguration()}} can pass in the {{Configuration}} it got from the {{main()}} method as a basis and the flow is easy to verify because.



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