You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by rm...@apache.org on 2015/01/26 15:44:30 UTC
flink git commit: [FLINK-1453] Fix failing flink-yarn-tests on OS X
Repository: flink
Updated Branches:
refs/heads/master 0548a93df -> 3bdeab1bf
[FLINK-1453] Fix failing flink-yarn-tests on OS X
The actual issue was that the web server of the job manager was using the default HTTP port (8081) instead of automatic port assignment by the operating system.
It seems that there are other services running on 8081 on OS X. So the fix is not only for OS X, it applies to all platforms.
Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/3bdeab1b
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/3bdeab1b
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/3bdeab1b
Branch: refs/heads/master
Commit: 3bdeab1bf55d08d97e316468bfd22db0b7fb96ee
Parents: 0548a93
Author: Robert Metzger <rm...@apache.org>
Authored: Mon Jan 26 14:47:59 2015 +0100
Committer: Robert Metzger <rm...@apache.org>
Committed: Mon Jan 26 15:43:00 2015 +0100
----------------------------------------------------------------------
.../apache/flink/runtime/jobmanager/web/WebInfoServer.java | 1 -
.../main/scala/org/apache/flink/yarn/ApplicationMaster.scala | 7 +++++--
2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flink/blob/3bdeab1b/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/web/WebInfoServer.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/web/WebInfoServer.java b/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/web/WebInfoServer.java
index 2b92f9f..733cf5e 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/web/WebInfoServer.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/web/WebInfoServer.java
@@ -92,7 +92,6 @@ public class WebInfoServer {
this.port = config.getInteger(ConfigConstants.JOB_MANAGER_WEB_PORT_KEY,
ConfigConstants.DEFAULT_JOB_MANAGER_WEB_FRONTEND_PORT);
-
this.timeout = timeout;
// get base path of Flink installation
http://git-wip-us.apache.org/repos/asf/flink/blob/3bdeab1b/flink-yarn/src/main/scala/org/apache/flink/yarn/ApplicationMaster.scala
----------------------------------------------------------------------
diff --git a/flink-yarn/src/main/scala/org/apache/flink/yarn/ApplicationMaster.scala b/flink-yarn/src/main/scala/org/apache/flink/yarn/ApplicationMaster.scala
index 01900ee..37ae5ed 100644
--- a/flink-yarn/src/main/scala/org/apache/flink/yarn/ApplicationMaster.scala
+++ b/flink-yarn/src/main/scala/org/apache/flink/yarn/ApplicationMaster.scala
@@ -82,7 +82,8 @@ object ApplicationMaster {
val jobManagerWebPort = 0 // automatic assignment.
- val (system, actor) = startJobManager(currDir, ownHostname,dynamicPropertiesEncodedString)
+ val (system, actor) = startJobManager(currDir, ownHostname,dynamicPropertiesEncodedString,
+ jobManagerWebPort)
actorSystem = system
jobManager = actor
@@ -159,7 +160,8 @@ object ApplicationMaster {
output.close()
}
- def startJobManager(currDir: String, hostname: String, dynamicPropertiesEncodedString: String):
+ def startJobManager(currDir: String, hostname: String, dynamicPropertiesEncodedString: String,
+ jobManagerWebPort: Int):
(ActorSystem, ActorRef) = {
LOG.info("Start job manager for yarn")
val args = Array[String]("--configDir", currDir)
@@ -173,6 +175,7 @@ object ApplicationMaster {
for(property <- dynamicProperties.asScala){
configuration.setString(property.f0, property.f1)
}
+ configuration.setInteger(ConfigConstants.JOB_MANAGER_WEB_PORT_KEY, jobManagerWebPort);
// set port to 0 to let Akka automatically determine the port.
implicit val jobManagerSystem = YarnUtils.createActorSystem(hostname, port = 0, configuration)