flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject flink git commit: [FLINK-4991] [taskmanager] Fix too aggressive timeout and improve logging in TaskTest
Date Wed, 02 Nov 2016 14:25:43 GMT
Repository: flink
Updated Branches:
  refs/heads/release-1.1 da32af123 -> 8412234eb


[FLINK-4991] [taskmanager] Fix too aggressive timeout and improve logging in TaskTest

This closes #2739.


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

Branch: refs/heads/release-1.1
Commit: 8412234ebe83bd80bb7706dd195c636e5b22e14c
Parents: da32af1
Author: Ufuk Celebi <uce@apache.org>
Authored: Wed Nov 2 10:28:12 2016 +0100
Committer: Ufuk Celebi <uce@apache.org>
Committed: Wed Nov 2 15:25:16 2016 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/flink/runtime/taskmanager/Task.java  | 3 +++
 .../test/java/org/apache/flink/runtime/taskmanager/TaskTest.java  | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/8412234e/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java b/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
index 4b47cba..ed15dbf 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
@@ -1203,6 +1203,7 @@ public class Task implements Runnable {
 			try {
 				if (watchDogThread != null) {
 					watchDogThread.start();
+					logger.info("Started cancellation watch dog");
 				}
 
 				// the user-defined cancel method may throw errors.
@@ -1294,6 +1295,8 @@ public class Task implements Runnable {
 								duration,
 								bld.toString());
 
+						logger.info("Notifying TaskManager about fatal error. {}.", msg);
+
 						taskManager.tell(new TaskManagerMessages.FatalError(msg, null));
 
 						return; // done, don't forget to leave the loop

http://git-wip-us.apache.org/repos/asf/flink/blob/8412234e/flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskTest.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskTest.java
b/flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskTest.java
index 56ab9c6..4aa80bd 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskTest.java
@@ -568,7 +568,7 @@ public class TaskTest extends TestLogger {
 	public void testWatchDogInterruptsTask() throws Exception {
 		Configuration config = new Configuration();
 		config.setLong(ConfigConstants.TASK_CANCELLATION_INTERVAL_MILLIS, 5);
-		config.setLong(ConfigConstants.TASK_CANCELLATION_TIMEOUT_MILLIS, 50);
+		config.setLong(ConfigConstants.TASK_CANCELLATION_TIMEOUT_MILLIS, 60 * 1000);
 
 		Task task = createTask(InvokableBlockingInCancel.class, config);
 		task.startTaskThread();


Mime
View raw message