Github user zentol commented on a diff in the pull request:
https://github.com/apache/flink/pull/2249#discussion_r70883754
--- 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 --
this should be in an `else` block, otherwise we may set a property even
though it is already set.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---