You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by StefanRRichter <gi...@git.apache.org> on 2018/06/14 10:13:56 UTC

[GitHub] flink pull request #5777: [FLINK-7897] Consider using nio.Files for file del...

Github user StefanRRichter commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5777#discussion_r195369715
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/blob/TransientBlobCleanupTask.java ---
    @@ -100,9 +102,15 @@ public void run() {
     				writeLock.lock();
     
     				try {
    -					if (!localFile.delete() && localFile.exists()) {
    -						log.warn("Failed to locally delete blob " + localFile.getAbsolutePath());
    -					} else {
    +					try {
    +						Files.delete(localFile.toPath());
    +					} catch (IOException e) {
    --- End diff --
    
    Why are `IOException` and `Exception` caught separately if the action is the same?


---