flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trohrm...@apache.org
Subject [3/6] flink git commit: [FLINK-5076] Shutting down TM when shutting down mini cluster.
Date Mon, 28 Nov 2016 16:22:15 GMT
[FLINK-5076] Shutting down TM when shutting down mini cluster.

This closes #2817.


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

Branch: refs/heads/flip-6
Commit: dc8254d4b3eb7333d1e3a2717e01bab051da33a1
Parents: 53f4ace
Author: biao.liub <biao.liub@alibaba-inc.com>
Authored: Wed Nov 16 17:54:48 2016 +0800
Committer: Till Rohrmann <trohrmann@apache.org>
Committed: Mon Nov 28 17:12:56 2016 +0100

----------------------------------------------------------------------
 .../apache/flink/runtime/minicluster/MiniCluster.java  | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/dc8254d4/flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java
index 611d4c4..3ede5b5 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java
@@ -312,6 +312,19 @@ public class MiniCluster {
 			resourceManagerRunners = null;
 		}
 
+		if (taskManagerRunners != null) {
+			for (TaskManagerRunner tm : taskManagerRunners) {
+				if (tm != null) {
+					try {
+						tm.shutDown(null);
+					} catch (Throwable t) {
+						exception = firstOrSuppressed(t, exception);
+					}
+				}
+			}
+			taskManagerRunners = null;
+		}
+
 		// shut down the RpcServices
 		exception = shutDownRpc(commonRpcService, exception);
 		exception = shutDownRpcs(jobManagerRpcServices, exception);


Mime
View raw message