You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by rm...@apache.org on 2014/10/13 18:11:28 UTC
[5/5] git commit: Fix bug in Blob Manager,
Cleanup Timer was not cancelled on Shutdown -
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/dddfb78a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-flink/tree/dddfb78a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-flink/diff/dddfb78a
Branch: refs/heads/release-0.7
Commit: dddfb78abd06adffb63af0e905845b85ec0cf1e2
Parents: f2ab125
Author: Aljoscha Krettek <al...@gmail.com>
Authored: Mon Oct 13 15:53:11 2014 +0200
Committer: Robert Metzger <rm...@apache.org>
Committed: Mon Oct 13 18:10:32 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/dddfb78a/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();
}