ASF GitHub Bot commented on FLINK-8799:

Github user GJL commented on a diff in the pull request:

    --- Diff: 
    @@ -172,6 +181,88 @@ public AbstractYarnClusterDescriptor(
                userJarInclusion = getUserJarInclusionMode(flinkConfiguration);
                this.configurationDirectory = 
    +           String yarnQueueConfigValue = 
    --- End diff --
    The difficulty of this ticket (FLINK-8799) is that `flinkConfiguration` is 
mutable. As long as a reference of `flinkConfiguration` can possibly leak, this 
class remains mutable. Also, there are some private methods that mutate the 
configuration. There are several places where we would need to make defensive 
copies, e.g., in the constructor. 

> Make AbstractYarnClusterDescriptor immutable
> --------------------------------------------
>                 Key: FLINK-8799
>                 URL: https://issues.apache.org/jira/browse/FLINK-8799
>             Project: Flink
>          Issue Type: Improvement
>          Components: YARN
>    Affects Versions: 1.5.0
>            Reporter: Gary Yao
>            Assignee: vinoyang
>            Priority: Major
>             Fix For: 1.6.0
> {{AbstractYarnClusterDescriptor}} should be made immutable. Currently, its 
> internal configuration is modified from different places which makes it 
> difficult to reason about the code. For example, it should not be possible to 
> modify the {{zookeeperNamespace}} using a setter method. A user of this class 
> should be forced to provide all information prior to creating the instance, 
> e.g., by passing a {{org.apache.flink.configuration.Configuration}} object.

This message was sent by Atlassian JIRA

Reply via email to