[
https://issues.apache.org/jira/browse/FLINK-8799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16384539#comment-16384539
]
ASF GitHub Bot commented on FLINK-8799:
---------------------------------------
Github user zhangminglei commented on a diff in the pull request:
https://github.com/apache/flink/pull/5617#discussion_r172009559
--- Diff:
flink-yarn/src/main/java/org/apache/flink/yarn/cli/FlinkYarnSessionCli.java ---
@@ -476,14 +379,12 @@ protected Configuration
applyCommandLineOptionsToConfiguration(CommandLine comma
final ApplicationId applicationId = getClusterId(commandLine);
- if (applicationId != null) {
- final String zooKeeperNamespace;
- if (commandLine.hasOption(zookeeperNamespace.getOpt())){
- zooKeeperNamespace =
commandLine.getOptionValue(zookeeperNamespace.getOpt());
- } else {
- zooKeeperNamespace =
effectiveConfiguration.getString(HA_CLUSTER_ID, applicationId.toString());
- }
-
+ final String zooKeeperNamespace;
+ if (commandLine.hasOption(zookeeperNamespace.getOpt())){
+ zooKeeperNamespace =
commandLine.getOptionValue(zookeeperNamespace.getOpt());
--- End diff --
Should have a space after ```if```
> 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
(v7.6.3#76005)