flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmetz...@apache.org
Subject [2/7] git commit: [FLINK-977] Improve error reporting for failed TM connection.
Date Mon, 25 Aug 2014 09:14:50 GMT
[FLINK-977] Improve error reporting for failed TM connection.

This closes #98


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

Branch: refs/heads/release-0.6.1
Commit: 350445343b4de24f5ac009dd3dd55f7522a656db
Parents: a05c567
Author: Robert Metzger <rmetzger@apache.org>
Authored: Sun Aug 17 13:53:37 2014 +0200
Committer: Robert Metzger <rmetzger@apache.org>
Committed: Mon Aug 25 10:49:28 2014 +0200

----------------------------------------------------------------------
 .../apache/flink/runtime/instance/DefaultInstanceManager.java  | 1 +
 .../java/org/apache/flink/runtime/taskmanager/TaskManager.java | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/35044534/flink-runtime/src/main/java/org/apache/flink/runtime/instance/DefaultInstanceManager.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/instance/DefaultInstanceManager.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/instance/DefaultInstanceManager.java
index da8202b..24d2fbc 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/instance/DefaultInstanceManager.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/instance/DefaultInstanceManager.java
@@ -135,6 +135,7 @@ public class DefaultInstanceManager implements InstanceManager {
 						}
 
 						hostsToRemove.add(entry);
+						LOG.info("Removing TaskManager "+entry.getValue().toString()+" due to inactivity for
more than "+(cleanUpInterval / 1000 )+" seconds");
 					}
 				}
 

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/35044534/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/TaskManager.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/TaskManager.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/TaskManager.java
index 7521218..7b4a961 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/TaskManager.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/TaskManager.java
@@ -227,7 +227,7 @@ public class TaskManager implements TaskOperationProtocol {
 				taskManagerAddress = getTaskManagerAddress(jobManagerAddress);
 			}
 			catch (Exception e) {
-				throw new RuntimeException("The TaskManager failed to determine its own network address.",
e);
+				throw new RuntimeException("The TaskManager failed to connect to the JobManager.", e);
 			}
 			
 			this.localInstanceConnectionInfo = new InstanceConnectionInfo(taskManagerAddress, ipcPort,
dataPort);
@@ -649,7 +649,7 @@ public class TaskManager implements TaskOperationProtocol {
 				strategy = AddressDetectionState.SLOW_CONNECT;
 				break;
 			case SLOW_CONNECT:
-				throw new RuntimeException("The TaskManager failed to detect its own IP address");
+				throw new RuntimeException("The TaskManager is unable to connect to the JobManager (Address:
'"+jobManagerAddress+"').");
 			}
 			if (LOG.isDebugEnabled()) {
 				LOG.debug("Defaulting to detection strategy " + strategy);
@@ -680,7 +680,7 @@ public class TaskManager implements TaskOperationProtocol {
 			socket.bind(bindP);
 			socket.connect(toSocket, timeout);
 		} catch (Exception ex) {
-			LOG.info("Failed to determine own IP address from '" + fromAddress + "': " + ex.getMessage());
+			LOG.info("Failed to connect to JobManager from address '" + fromAddress + "': " + ex.getMessage());
 			if (LOG.isDebugEnabled()) {
 				LOG.debug("Failed with exception", ex);
 			}


Mime
View raw message