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:04 GMT
Repository: flink
Updated Branches:
  refs/heads/master 223b0aa0e -> 30a53ef69


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

This closes #2738.


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

Branch: refs/heads/master
Commit: 30a53ef69af75fd6d119f02c4f54c355fe902f02
Parents: 223b0aa
Author: Ufuk Celebi <uce@apache.org>
Authored: Wed Nov 2 10:24:54 2016 +0100
Committer: Ufuk Celebi <uce@apache.org>
Committed: Wed Nov 2 15:24:58 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/30a53ef6/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 113f7ab..f38f170 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
@@ -1261,6 +1261,7 @@ public class Task implements Runnable, TaskActions {
 			try {
 				if (watchDogThread != null) {
 					watchDogThread.start();
+					logger.info("Started cancellation watch dog");
 				}
 
 				// the user-defined cancel method may throw errors.
@@ -1352,6 +1353,8 @@ public class Task implements Runnable, TaskActions {
 								duration,
 								bld.toString());
 
+						logger.info("Notifying TaskManager about fatal error. {}.", msg);
+
 						taskManager.notifyFatalError(msg, null);
 
 						return; // done, don't forget to leave the loop

http://git-wip-us.apache.org/repos/asf/flink/blob/30a53ef6/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 c38d23a..761eaa2 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
@@ -579,7 +579,7 @@ public class TaskTest extends TestLogger {
 	public void testWatchDogInterruptsTask() throws Exception {
 		Configuration config = new Configuration();
 		config.setLong(TaskManagerOptions.TASK_CANCELLATION_INTERVAL.key(), 5);
-		config.setLong(TaskManagerOptions.TASK_CANCELLATION_TIMEOUT.key(), 50);
+		config.setLong(TaskManagerOptions.TASK_CANCELLATION_TIMEOUT.key(), 60 * 1000);
 
 		Task task = createTask(InvokableBlockingInCancel.class, config);
 		task.startTaskThread();


Mime
View raw message