flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aljos...@apache.org
Subject [2/2] git commit: Fix bug in Blob Manager, Cleanup Timer was not cancelled on Shutdown -
Date Mon, 13 Oct 2014 14:02:37 GMT
Fix bug in Blob Manager, Cleanup Timer was not cancelled on Shutdown                      
                   -


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

Branch: refs/heads/master
Commit: 17e9b5b2a1923127afed20de46216f002b265e01
Parents: a868da8
Author: Aljoscha Krettek <aljoscha.krettek@gmail.com>
Authored: Mon Oct 13 15:53:11 2014 +0200
Committer: Aljoscha Krettek <aljoscha.krettek@gmail.com>
Committed: Mon Oct 13 15:53:11 2014 +0200

----------------------------------------------------------------------
 .../execution/librarycache/BlobLibraryCacheManager.java      | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/17e9b5b2/flink-runtime/src/main/java/org/apache/flink/runtime/execution/librarycache/BlobLibraryCacheManager.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/execution/librarycache/BlobLibraryCacheManager.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/execution/librarycache/BlobLibraryCacheManager.java
index 942a0ef..a6ee951 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/execution/librarycache/BlobLibraryCacheManager.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/execution/librarycache/BlobLibraryCacheManager.java
@@ -82,6 +82,11 @@ public final class BlobLibraryCacheManager extends TimerTask implements
LibraryC
 	private final Map<BlobKey, Integer> blobKeyReferenceCounter = new
 			HashMap<BlobKey, Integer>();
 
+	/**
+	 * Timer for cleanup task
+	 */
+	private final Timer timer;
+
 
 	/**
 	 * All registered blobs
@@ -94,7 +99,7 @@ public final class BlobLibraryCacheManager extends TimerTask implements
LibraryC
 		this.blobService = blobService;
 
 		// Initializing the clean up task
-		Timer timer = new Timer();
+		timer = new Timer();
 		long cleanupInterval = configuration.getLong(
 				ConfigConstants.LIBRARY_CACHE_MANAGER_CLEANUP_INTERVAL,
 				ConfigConstants.DEFAULT_LIBRARY_CACHE_MANAGER_CLEANUP_INTERVAL)*1000;
@@ -251,6 +256,7 @@ public final class BlobLibraryCacheManager extends TimerTask implements
LibraryC
 
 	@Override
 	public void shutdown() throws IOException{
+		timer.cancel();
 		blobService.shutdown();
 	}
 


Mime
View raw message