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 12:52:14 GMT
Repository: flink
Updated Branches:
  refs/heads/master 43eee9002 -> 33780ef4f


[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/3b32d1bc
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/3b32d1bc
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/3b32d1bc

Branch: refs/heads/master
Commit: 3b32d1bcf62d0eac819d952f8d6a47284b411a18
Parents: 43eee90
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 13:50:39 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/3b32d1bc/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 1ef2cdc..a0cf1d5 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
@@ -134,7 +134,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 {
@@ -146,7 +146,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/3b32d1bc/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 cd67069..7b0e7d0 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
@@ -1741,8 +1741,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(
@@ -1759,9 +1758,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