[ https://issues.apache.org/jira/browse/FLINK-19493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17206164#comment-17206164 ]
Aljoscha Krettek commented on FLINK-19493: ------------------------------------------ I'll look into it while working on it. > 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 > 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)