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

    https://github.com/apache/flink/pull/2249#discussion_r70887016
  
    --- Diff: 
flink-yarn/src/main/java/org/apache/flink/yarn/AbstractYarnClusterDescriptor.java
 ---
    @@ -545,6 +551,19 @@ protected YarnClusterClient deployInternal() throws 
Exception {
                // Set-up ApplicationSubmissionContext for the application
                ApplicationSubmissionContext appContext = 
yarnApplication.getApplicationSubmissionContext();
     
    +           final ApplicationId appId = appContext.getApplicationId();
    +
    +           // ------------------ Add Zookeeper namespace to local 
flinkConfiguraton ------
    +           String zkNamespace = getZookeeperNamespace();
    +           // no user specified cli argument for namespace?
    +           if(zkNamespace == null || zkNamespace.isEmpty()) {
    +                   // namespace defined in config? else use applicationId 
as default.
    +                   zkNamespace = 
flinkConfiguration.getString(ConfigConstants.ZOOKEEPER_NAMESPACE_KEY, 
String.valueOf(appId));
    +                   setZookeeperNamespace(zkNamespace);
    +           }
    +
    +           
flinkConfiguration.setString(ConfigConstants.ZOOKEEPER_NAMESPACE_KEY, 
zkNamespace);
    --- End diff --
    
    simply moving this to the else block makes the code incorrect. i preferred 
the chance of overwriting a value with itself once in non performance critical 
code over bloating up the code.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to