flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject [1/2] flink git commit: [FLINK-4667] Fix for using correct ZK namespace in Yarn deployment
Date Fri, 14 Oct 2016 14:38:38 GMT
Repository: flink
Updated Branches:
  refs/heads/master 85b53444a -> 6d4dd7585


[FLINK-4667] Fix for using correct ZK namespace in Yarn deployment


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/6d4dd758
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/6d4dd758
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/6d4dd758

Branch: refs/heads/master
Commit: 6d4dd75859aa5e78a20dc3a9492391f1c7f7ca7a
Parents: 5bd4701
Author: Vijay Srinivasaraghavan <vijayaraghavan.srinivasaraghavan@emc.com>
Authored: Fri Sep 23 10:23:19 2016 -0700
Committer: Maximilian Michels <mxm@apache.org>
Committed: Fri Oct 14 16:36:30 2016 +0200

----------------------------------------------------------------------
 .../src/main/flink-bin/conf/log4j-yarn-session.properties   | 4 ++++
 .../java/org/apache/flink/yarn/cli/FlinkYarnSessionCli.java | 9 +++++++++
 2 files changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/6d4dd758/flink-dist/src/main/flink-bin/conf/log4j-yarn-session.properties
----------------------------------------------------------------------
diff --git a/flink-dist/src/main/flink-bin/conf/log4j-yarn-session.properties b/flink-dist/src/main/flink-bin/conf/log4j-yarn-session.properties
index 07f65a7..fd8d978 100644
--- a/flink-dist/src/main/flink-bin/conf/log4j-yarn-session.properties
+++ b/flink-dist/src/main/flink-bin/conf/log4j-yarn-session.properties
@@ -25,3 +25,7 @@ log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS}
%-5p
 
 # suppress the irrelevant (wrong) warnings from the netty channel handler
 log4j.logger.org.jboss.netty.channel.DefaultChannelPipeline=ERROR, stdout
+log4j.logger.org.apache.zookeeper=WARN, stdout
+log4j.logger.org.apache.flink.shaded.org.apache.curator.framework=WARN, stdout
+log4j.logger.org.apache.flink.runtime.util.ZooKeeperUtils=WARN, stdout
+log4j.logger.org.apache.flink.runtime.leaderretrieval.ZooKeeperLeaderRetrievalService=WARN,
stdout

http://git-wip-us.apache.org/repos/asf/flink/blob/6d4dd758/flink-yarn/src/main/java/org/apache/flink/yarn/cli/FlinkYarnSessionCli.java
----------------------------------------------------------------------
diff --git a/flink-yarn/src/main/java/org/apache/flink/yarn/cli/FlinkYarnSessionCli.java b/flink-yarn/src/main/java/org/apache/flink/yarn/cli/FlinkYarnSessionCli.java
index e4da140..84d2fe6 100644
--- a/flink-yarn/src/main/java/org/apache/flink/yarn/cli/FlinkYarnSessionCli.java
+++ b/flink-yarn/src/main/java/org/apache/flink/yarn/cli/FlinkYarnSessionCli.java
@@ -572,6 +572,15 @@ public class FlinkYarnSessionCli implements CustomCommandLine<YarnClusterClient>
 		} else if (cmd.hasOption(APPLICATION_ID.getOpt())) {
 
 			AbstractYarnClusterDescriptor yarnDescriptor = getClusterDescriptor();
+
+			//configure ZK namespace depending on the value passed
+			String zkNamespace = cmd.hasOption(ZOOKEEPER_NAMESPACE.getOpt()) ?
+									cmd.getOptionValue(ZOOKEEPER_NAMESPACE.getOpt())
+									:yarnDescriptor.getFlinkConfiguration()
+									.getString(HA_ZOOKEEPER_NAMESPACE_KEY, cmd.getOptionValue(APPLICATION_ID.getOpt()));
+			LOG.info("Going to use the ZK namespace: {}", zkNamespace);
+			yarnDescriptor.getFlinkConfiguration().setString(HA_ZOOKEEPER_NAMESPACE_KEY, zkNamespace);
+
 			try {
 				yarnCluster = yarnDescriptor.retrieve(cmd.getOptionValue(APPLICATION_ID.getOpt()));
 			} catch (Exception e) {


Mime
View raw message