Repository: flink
Updated Branches:
  refs/heads/master 22423e23f -> 28c6254ee


[FLINK-3365] [taskmanager] Properly shut down cleanup timer thread


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

Branch: refs/heads/master
Commit: 457cb14537c0e6f89cdbcc0564054f86bfbbb3eb
Parents: a277543
Author: Stephan Ewen <se...@apache.org>
Authored: Mon Feb 8 13:21:42 2016 +0100
Committer: Stephan Ewen <se...@apache.org>
Committed: Mon Feb 8 16:57:57 2016 +0100

----------------------------------------------------------------------
 .../execution/librarycache/BlobLibraryCacheManager.java       | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/457cb145/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 98caac4..fcffd39 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
@@ -68,14 +68,16 @@ public final class BlobLibraryCacheManager extends 
TimerTask implements LibraryC
        /** The blob service to download libraries */
        private final BlobService blobService;
        
+       private final Timer cleanupTimer;
+       
        // 
--------------------------------------------------------------------------------------------
 
        public BlobLibraryCacheManager(BlobService blobService, long 
cleanupInterval) {
                this.blobService = blobService;
 
                // Initializing the clean up task
-               Timer timer = new Timer(true);
-               timer.schedule(this, cleanupInterval);
+               this.cleanupTimer = new Timer(true);
+               this.cleanupTimer.schedule(this, cleanupInterval);
        }
 
        // 
--------------------------------------------------------------------------------------------
@@ -199,6 +201,7 @@ public final class BlobLibraryCacheManager extends 
TimerTask implements LibraryC
        @Override
        public void shutdown() throws IOException{
                blobService.shutdown();
+               cleanupTimer.cancel();
        }
        
        /**

Reply via email to