flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trohrm...@apache.org
Subject [1/2] flink git commit: [FLINK-5492] [log] Log unresolved address when starting an ActorSystem
Date Mon, 23 Jan 2017 13:14:58 GMT
Repository: flink
Updated Branches:
  refs/heads/release-1.2 940b4900d -> 085288e7e


[FLINK-5492] [log] Log unresolved address when starting an ActorSystem

With the Flakka changes we no longer resolve the given hostname into an IP. Thus,
we should henceforth log the unresolved hostname as the address to which the
ActorSystem binds to.

This closes #3161.


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

Branch: refs/heads/release-1.2
Commit: ae69f91301c934b43e475ea446c049747d4393bc
Parents: 940b490
Author: Till Rohrmann <trohrmann@apache.org>
Authored: Wed Jan 18 17:16:20 2017 +0100
Committer: Till Rohrmann <trohrmann@apache.org>
Committed: Mon Jan 23 14:14:27 2017 +0100

----------------------------------------------------------------------
 .../apache/flink/runtime/clusterframework/BootstrapTools.java  | 5 +++--
 .../org/apache/flink/runtime/taskmanager/TaskManager.scala     | 6 ++----
 2 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/ae69f913/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java
index 2a33c44..1840fc7 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java
@@ -130,7 +130,7 @@ public class BootstrapTools {
 				int listeningPort,
 				Logger logger) throws Exception {
 
-		String hostPortUrl = NetUtils.hostAndPortToUrlString(listeningAddress, listeningPort);
+		String hostPortUrl = listeningAddress + ':' + listeningPort;
 		logger.info("Trying to start actor system at {}", hostPortUrl);
 
 		try {
@@ -142,7 +142,8 @@ public class BootstrapTools {
 			logger.debug("Using akka configuration\n {}", akkaConfig);
 
 			ActorSystem actorSystem = AkkaUtils.createActorSystem(akkaConfig);
-			logger.info("Actor system started at {}", hostPortUrl);
+
+			logger.info("Actor system started at {}", AkkaUtils.getAddress(actorSystem));
 			return actorSystem;
 		}
 		catch (Throwable t) {

http://git-wip-us.apache.org/repos/asf/flink/blob/ae69f913/flink-runtime/src/main/scala/org/apache/flink/runtime/taskmanager/TaskManager.scala
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/scala/org/apache/flink/runtime/taskmanager/TaskManager.scala
b/flink-runtime/src/main/scala/org/apache/flink/runtime/taskmanager/TaskManager.scala
index ec5ff3d..7952418 100644
--- a/flink-runtime/src/main/scala/org/apache/flink/runtime/taskmanager/TaskManager.scala
+++ b/flink-runtime/src/main/scala/org/apache/flink/runtime/taskmanager/TaskManager.scala
@@ -1732,8 +1732,7 @@ object TaskManager {
 
     // Bring up the TaskManager actor system first, bind it to the given address.
     
-    LOG.info("Starting TaskManager actor system at " + 
-      NetUtils.hostAndPortToUrlString(taskManagerHostname, actorSystemPort))
+    LOG.info("Starting TaskManager actor system at {}:{}.", taskManagerHostname, actorSystemPort)
 
     val taskManagerSystem = try {
       val akkaConfig = AkkaUtils.getAkkaConfig(
@@ -1750,9 +1749,8 @@ object TaskManager {
         if (t.isInstanceOf[org.jboss.netty.channel.ChannelException]) {
           val cause = t.getCause()
           if (cause != null && t.getCause().isInstanceOf[java.net.BindException])
{
-            val address = NetUtils.hostAndPortToUrlString(taskManagerHostname, actorSystemPort)
             throw new IOException("Unable to bind TaskManager actor system to address " +
-              address + " - " + cause.getMessage(), t)
+              taskManagerHostname + ':' + actorSystemPort + " - " + cause.getMessage(), t)
           }
         }
         throw new Exception("Could not create TaskManager actor system", t)


Mime
View raw message